A xlsx library could take two kind of approach
-
A simple api which supports limited functionality of xlsx file. This would mostly take a list like data as input and would create a xlsx file from it. Customization like custom style, custom field width etc would be hard or not possible to implement via this approach.
-
Provide the necessary low-level constructs required to create a xlsx file. The user needs to be familiar with the xlsx specification. But on the plus side, any kind of customization could be done easily.
This library takes the second approach.
A xlsx file is a zip file containing a number of XML files. This library utilizes xml_stream and zstream to create XML files and zip them as a stream. Check the test file for full example.
-
SpreadsheetML provides a highlevel overview of the xlsx file.