Export Formats¶
CalcBridge supports four export formats, each optimized for different use cases.
XLSX (Excel Workbook)¶
The richest export format, preserving full workbook structure.
Features¶
- Multi-sheet export with sheet selection
- Formula text preservation (optional)
- Workbook metadata inclusion
- Provenance manifest as Custom XML Part
- Password protection support
Options¶
| Option | Type | Default | Description |
|---|---|---|---|
include_formulas | boolean | false | Preserve formula expressions |
include_metadata | boolean | true | Include workbook metadata |
include_provenance | boolean | true | Embed provenance manifest |
password | string | - | Password-protect the file |
sheets | string[] | all | Specific sheets to export |
Provenance Integration¶
XLSX exports can include a Custom XML Part containing the provenance manifest:
<?xml version="1.0" encoding="UTF-8"?>
<calcbridge-provenance xmlns="urn:calcbridge:provenance:v1">
<export_id>exp_abc123</export_id>
<data_hash>sha256:e3b0c44298fc1c...</data_hash>
<hmac_signature>hmac-sha256:b0344c61d8db...</hmac_signature>
<manifest_version>cb_hash_v1</manifest_version>
<hash_scope>all_sheets</hash_scope>
</calcbridge-provenance>
CSV (Comma-Separated Values)¶
Flat file format for interoperability with external tools.
Features¶
- Single-sheet export (one CSV per sheet)
- UTF-8 encoding
- Standard RFC 4180 compliance
Limitations¶
- No formula preservation
- No multi-sheet in a single file
- No provenance signing
- No password protection
PDF (Document)¶
Read-only format for reports and presentations.
Features¶
- Formatted table layout
- Password protection support
- Page headers and footers
Limitations¶
- No formula preservation
- No provenance signing
- Large workbooks may span many pages
JSON (Data)¶
Structured data format for API integrations.
Features¶
- Complete cell data with types
- Sheet structure preservation
- Metadata inclusion
Output Structure¶
{
"workbook": {
"name": "CLO Portfolio Q1 2026",
"exported_at": "2026-01-25T10:30:00Z"
},
"sheets": [
{
"name": "Holdings",
"rows": [
{"cusip": "12345ABC", "par_value": 5000000, "spread": 350},
{"cusip": "67890DEF", "par_value": 3000000, "spread": 275}
]
}
]
}
Format Comparison¶
| Feature | XLSX | CSV | JSON | |
|---|---|---|---|---|
| Multi-sheet | Yes | No | Yes | Yes |
| Formulas | Optional | No | No | No |
| Provenance | Yes | No | No | No |
| Password | Yes | No | Yes | No |
| Machine-readable | Yes | Yes | No | Yes |
| Human-readable | Yes | Yes | Yes | Partial |