---
name: ods
displayName: ODS Spreadsheet Reader & Converter
description: Reads OpenDocument Spreadsheet (.ods) files and converts them to
  CSV or JSON. Use when you need to extract tabular data from an ODS file or
  convert it to a portable format.
tags:
  - ods
  - spreadsheet
  - opendocument
  - csv
  - json
  - convert
  - read
capabilities:
  - ReadOds
  - ConvertToCsv
  - ConvertToJson
  - ListSheets
  - ExtractFormulas
representativeQueries:
  - Read a .ods file and show me the data
  - Convert an ODS spreadsheet to CSV
  - Extract data from an OpenDocument spreadsheet as JSON
  - What sheets are in this ODS file?
  - Export ODS file contents to CSV format
version: 0.1.0
tier: curated
---

# ODS Spreadsheet Reader & Converter

Reads OpenDocument Spreadsheet (`.ods`) files and converts their tabular content to CSV or JSON using only Python's standard library. ODS is the ISO-standard spreadsheet format used by LibreOffice Calc, Google Sheets (export), and other open-source tools; internally it is a ZIP archive containing `content.xml`.

## When to use

Use this skill when a user provides a `.ods` file and asks to:
- Read or preview its contents
- Convert the spreadsheet to CSV or JSON for downstream processing
- List available sheets
- Extract specific columns or rows

## Steps

1. **Detect format.** Confirm the file is a valid ZIP archive containing `content.xml` (the script validates this automatically; `.ods` is the conventional extension but is not checked).
2. **Run the converter script.** Call `scripts/ods_to_csv.py <file_path>` (optionally with `--sheet <name>`, `--format json`, or `--list-sheets`) to parse the file and emit the result to stdout.
3. **Route by task.** For a single-sheet read, default CSV output is usually sufficient. For multi-sheet exports or JSON output, pass the appropriate flag.
4. **Present or save output.** Show the result inline for small files; for large files, suggest saving to a `.csv` or `.json` file.

## Operations

| Capability | CRUD | Resource | Tool |
|---|---|---|---|
| `ReadOds` | READ | ODS file | `scripts/ods_to_csv.py` |
| `ConvertToCsv` | READ | ODS sheet | `scripts/ods_to_csv.py` |
| `ConvertToJson` | READ | ODS sheet | `scripts/ods_to_csv.py --format json` |
| `ListSheets` | READ | ODS file | `scripts/ods_to_csv.py --list-sheets` |
| `ExtractFormulas` | READ | ODS sheet | `scripts/ods_to_csv.py --formulas` |

## Output

- **CSV** (default): comma-separated rows, one per spreadsheet row, written to stdout.
- **JSON**: array of objects keyed by the first-row headers, written to stdout.
- **Sheet list**: newline-separated sheet names.
- **Errors**: printed to stderr with a clear message; the script exits non-zero on failure.

## Notes

- Repeated empty cells (`table:number-columns-repeated`) are expanded automatically; trailing empty rows are stripped.
- Formula cells emit their cached display value by default; pass `--formulas` to include the raw formula expression alongside.
- The first sheet is selected by default; use `--sheet <name>` to target a different one.
- Large files with many repeated-column markers can produce wide rows — check the column count before piping into tools with column-count limits.

<!-- runner-fallback -->
## Remote runner (MCP)
Can't run this locally (no setup, missing dependency)? The StealthStack runner exposes the **same code** as server-side MCP tools — no local install needed: `ods_list_sheets`, `ods_to_csv`, `ods_to_json`. Call the `application/mcp` catalog twin of this skill (its `runnerTwin`).
