Supported Formats
Hucre supports reading and writing multiple spreadsheet formats with a unified, type-safe API.
Excel (XLSX)
Office Open XML Spreadsheet
The modern Excel format, used by Microsoft Excel 2007 and later. XLSX files are ZIP archives containing XML files that describe workbook structure, data, and styling.
Feature Support
| Feature | Read | Write |
|---|---|---|
| Multiple Sheets | ||
| Formulas | ||
| Cell Styles | ||
| Data Validation | ||
| Merged Cells | ||
| Conditional Formatting | ||
| Charts | ||
| Images | ||
| Comments | ||
| Hyperlinks |
"keyword">import { readWorkbook, writeWorkbook } "keyword">from "hucre";// Read XLSX file"keyword">const workbook = "keyword">await readWorkbook("data.xlsx");"keyword">const sheet = workbook.sheet("Sales");"keyword">const data = sheet.toJSON();// Write XLSX file"keyword">await writeWorkbook(workbook, { path: "output.xlsx", format: "xlsx"});CSV
Comma-Separated Values
A simple, plain-text format for tabular data. CSV files are universally supported and ideal for data interchange, though they lack support for multiple sheets or formatting.
Feature Support
| Feature | Read | Write |
|---|---|---|
| Multiple Sheets | ||
| Formulas | ||
| Cell Styles | ||
| Data Validation | ||
| Merged Cells | ||
| Conditional Formatting | ||
| Charts | ||
| Images | ||
| Comments | ||
| Hyperlinks | ||
| Custom Delimiters | ||
| Header Detection | ||
| Encoding Options | ||
| Streaming Support |
"keyword">import { readCSV, writeCSV } "keyword">from "hucre";// Read CSV with options"keyword">const data = "keyword">await readCSV("data.csv", { delimiter: ",", hasHeader: true, encoding: "utf-8"});// Write CSV"keyword">await writeCSV(data, { path: "output.csv", delimiter: ";", includeHeader: true});OpenDocument (ODS)
OpenDocument Spreadsheet
An open standard format used by LibreOffice, OpenOffice, and other applications. ODS files are ZIP archives containing XML files following the OASIS OpenDocument specification.
Feature Support
| Feature | Read | Write |
|---|---|---|
| Multiple Sheets | ||
| Formulas | ||
| Cell Styles | ||
| Data Validation | ||
| Merged Cells | ||
| Conditional Formatting | ||
| Charts | ||
| Images | ||
| Comments | ||
| Hyperlinks |
"keyword">import { readWorkbook, writeWorkbook } "keyword">from "hucre";// Read ODS file"keyword">const workbook = "keyword">await readWorkbook("data.ods");"keyword">const sheet = workbook.sheet(0);"keyword">const rows = sheet.rows();// Write ODS file"keyword">await writeWorkbook(workbook, { path: "output.ods", format: "ods"});Format Comparison
Choose the right format for your use case.
| Aspect | XLSX | CSV | ODS |
|---|---|---|---|
| File Size | Compressed | Plain text | Compressed |
| Compatibility | Excel, Google Sheets | Universal | LibreOffice, OpenOffice |
| Best For | Rich documents | Data interchange | Open ecosystems |
| Parse Speed | Medium | Fast | Medium |
Ready to work with spreadsheets?
Apply for early access to start building with Hucre.