Exports data as an ODS (OpenDocument Spreadsheet) file using the odfpy library.
Produces a single-sheet ODS document with column headers in the first row followed by data rows. All values are written as text cells. Rows are buffered in memory and the file is written when CloseFile is called.
odfpy (listed in requirements.txt)from ObjDataExportOds import ObjExportApi
exporter = ObjExportApi()
exporter.OpenFile("/tmp/output.ods")
exporter.WriteHeader(["Name", "Score"])
exporter.WriteData([["Alice", 95], ["Bob", 82]])
exporter.CloseFile()
| Method | Description |
|---|---|
OpenFile(filename) |
Set output path and reset row buffer |
WriteHeader(fields) |
Store column names and track redact columns |
WriteData(data) |
Buffer rows (list of lists) with redaction applied |
CloseFile() |
Build ODS document and save to disk |
EscapeCSV(val) |
No-op passthrough |
DefaultExtension() |
Returns "ods" |