libxcsv
A lightweight, low-level library for converting Excel (.xlsx) sheets to CSV by stream-parsing the underlying XML.
Usage
libxcsv is the core engine for the xcsv CLI tool. It operates by:
- Opening the
.xlsxfile as a zip archive (open_zip). - Parsing metadata from
workbook.xml(parse_workbook),sharedStrings.xml(read_shared_strings), andstyles.xml(parse_styles). - Streaming the contents of each worksheet and converting rows to CSV format using
export_sheet_xml_to_csv.
Core Functions
open_zip(): Opens the.xlsxfile.parse_workbook()&parse_workbook_rels(): Reads sheet metadata.read_shared_strings(): Parses the shared string table.parse_styles(): Parses cell styles for date/time formatting.export_sheet_xml_to_csv(): The main function to convert a sheet XML to a CSV file.