ODS Parsing API

Parse OpenDocument Spreadsheet files from LibreOffice Calc to structured JSON. You get one table per sheet, with merged cells kept. The file is read directly, with no LibreOffice install and no conversion to XLSX.

Spreadsheets Without LibreOffice

An .ods file is a zip archive whose content.xml describes every sheet as a table:table element, in the OpenDocument Format (ODF). Cells, rows, headers and merges all use ODF's table: elements, which are different from Excel's XML.

Many parsers handle ODS by running LibreOffice to convert it to XLSX or CSV first. That can lose the split into sheets and the merged cells, and it adds seconds per file. AILANG Parse reads the ODF directly. Each sheet becomes a section block holding one table block, in the same format as for XLSX.

ODS and XLSX files come out in the same block format, so one piece of code handles both.

Raw ODF XML vs Structured Output

Raw content.xml
<office:body>
 <office:spreadsheet>
  <table:table table:name="Q1">
   <table:table-row>
    <table:table-cell
      table:number-columns-spanned="2">
     <text:p>Region</text:p>
    </table:table-cell>
    <table:table-cell>
     <text:p>Total</text:p>
    </table:table-cell>
   </table:table-row>
   <table:table-row>
    <table:table-cell>
     <text:p>EMEA</text:p>
    </table:table-cell>
    <table:table-cell>
     <text:p>UK</text:p>
    </table:table-cell>
    <table:table-cell>
     <text:p>125000</text:p>
    </table:table-cell>
   </table:table-row>
  </table:table>
 </office:spreadsheet>
</office:body>
Structured output
{
  "metadata": {
    "title": "Q1 Targets",
    "author": "Finance Team"
  },
  "blocks": [
    {
      "type": "section",
      "kind": "sheet:Q1",
      "blocks": [
        {
          "type": "table",
          "headers": [
            {"text": "Region", "colSpan": 2},
            {"text": "Total"}
          ],
          "rows": [
            [
              {"text": "EMEA"},
              {"text": "UK"},
              {"text": "125000"}
            ]
          ]
        }
      ]
    }
  ]
}

What Gets Extracted

One Section per Sheet

Every table:table becomes a section block with kind: "sheet:<name>". The sheet name comes from the table:name attribute.

Tables with Headers

The first non-empty row of each sheet is treated as the header, and the rows after it as data. Empty rows at the end are dropped (ODS files often pad sheets with thousands of them).

Merged Cells

A cell merged across columns (table:number-columns-spanned) is marked with colSpan. The table format is the same as for XLSX, so the same code reads both.

Cell Text

Each cell comes out as text: the value as displayed. Numbers, dates and formula results appear as they are shown in the sheet, the same as for XLSX.

Multi-Sheet Workbooks

A workbook with dozens of sheets comes out as an ordered list of section blocks, one per sheet, in workbook order.

Metadata

Document metadata comes from meta.xml: dc:title, dc:creator, dc:date. Useful for indexing many spreadsheets by author or date.

Sheets & Merges

Each sheet is its own section block, so your code can go through the workbook sheet by sheet. Want a single sheet by name? Filter on kind. Want every table in the file? Go through all the sections.

from ailang_parse import DocParse

result = DocParse(api_key="...").parse_file("targets.ods")

for sheet in result.blocks:
    if sheet.type != "section":
        continue
    sheet_name = sheet.kind.replace("sheet:", "")
    table = sheet.blocks[0]    # one TableBlock per sheet
    print(sheet_name, "-", len(table.rows), "rows")
    for row in table.rows:
        print("  ", [cell.text for cell in row])

Use Cases

Open Data Pipelines

Many government open-data portals publish ODS alongside CSV. ODS keeps the split into sheets that CSV flattens. Because ODS is read directly, you can load the structured version as it is.

Mixed-Office Pipelines

Organisations where some people use LibreOffice end up with mixed XLSX and ODS archives. One parser and one output format cover both. See XLSX parsing for the Excel counterpart.

Financial Data Migration

Move older ODS workbooks to a database, data warehouse or current spreadsheet format. Sheets, column headers and merged cells survive the move.

Tabular RAG

Each sheet can be retrieved as one chunk. Embed the sheet as a unit, so the model gets a whole table instead of a slice of cells cut from the middle of it.

Compliance Archives

ODS is the standard for long-term preservation of spreadsheet data in many EU jurisdictions. Index, search, and audit ODS archives without converting them to a proprietary format.

Browser-Based Review

Drop an ODS into the Workbench. It is parsed in your browser tab and never leaves your device. Useful when financial data is confidential.

Try It

Workbench (in-browser)

Drop an ODS file into the Workbench. It is parsed in your browser by the same parser the CLI uses. No upload, no signup.

CLI

# Parse an ODS file
docparse data.ods

# Convert ODS to CSV
docparse data.ods --convert data.csv

# Convert ODS to XLSX
docparse data.ods --convert data.xlsx

API

curl -X POST https://docparse.ailang.sunholo.com/api/v1/parse \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "filepath=@data.ods" \
  -F "outputFormat=blocks"

Parse in Browser    API Reference

Frequently Asked Questions

How do I parse an ODS file to JSON?

Drop it into the Workbench, send it to the API, or use the Python/JS/Go/R SDK. The parser reads the OpenDocument Spreadsheet XML directly, with no LibreOffice install and no conversion to XLSX.

Are sheets extracted individually?

Yes. Every sheet (table:table) becomes a section block with kind: "sheet:<name>", holding one table block with its rows, headers and merged cells.

Are merged cells preserved?

Yes. ODF marks a cell merged across columns with table:number-columns-spanned. AILANG Parse marks it with colSpan, in the same table format as for XLSX.

Does ODS parsing need LibreOffice installed?

No. content.xml is read directly from the .ods file. LibreOffice (soffice) is never run, and nothing is converted to XLSX.

Does ODS parsing run in the browser?

Yes. The file is parsed in your browser tab (using WebAssembly) by the same parser the CLI uses. It never leaves your device.