# OpenDocument Spreadsheet

> Load, edit and save ODS workbooks with TX Sheet Control in browser and server applications, using shared stream types and original-package preservation.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Sheet Control > Document Processing > OpenDocument Spreadsheet
- **1177 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/document-processing/ods/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/document-processing/ods/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/document-processing/ods/llms-full.txt

---

OpenDocument Spreadsheet files (`.ods`) use `StreamType.OpenDocumentSpreadsheet`. The same filter runs in the browser editor and server processing. Use binary input and output; `saveText` is for CSV, XML and JSON.

### Load, Edit and Save

The application supplies an initialized `editor` and the selected ODS `file`.

```typescript
import { StreamType } from '@txtextcontrol/tx-sheet-control';

const result = await editor.load(await file.arrayBuffer(), StreamType.OpenDocumentSpreadsheet, {
    openDocumentSpreadsheet: { maxEditableCells: 100000 }
});
editor.workbook.sheets.at(0).cell('B2').setValue(125);
const ods = await editor.save(StreamType.OpenDocumentSpreadsheet);
const blob = new Blob([ods], { type: 'application/vnd.oasis.opendocument.spreadsheet' });
```

Use your application's download or storage flow to deliver the bytes. Inspect `result.warnings` for projection and preservation notices. A canceled or rejected load leaves the previous document in place.

### Server Processing

The application configures and owns the licensed `ServerSheetControl` instance.

```csharp
using TXTextControl.TXSheetControl.Server;

await control.LoadAsync("orders.ods", StreamType.OpenDocumentSpreadsheet,
    new LoadOptions { OpenDocumentSpreadsheet = new() { MaxEditableCells = 100000 } });
var sheet = await control.Workbook.Sheets.AtAsync(0);
await sheet.Cell("B2").SetValueAsync(125);
await control.SaveAsync("updated-orders.ods", StreamType.OpenDocumentSpreadsheet);
```

Node.js uses `control.load(bytes, StreamType.OpenDocumentSpreadsheet)` and `control.save(StreamType.OpenDocumentSpreadsheet)`. Angular re-exports `StreamType` and the load/save option types. ASP.NET Core editors use the browser editor's methods after initialization.

### Feature and Source Preservation

The standard ODF projection carries worksheet values, formulas, cell formatting, rich text, merged cells, dimensions, views, notes, hyperlinks, validation, print layouts and supported drawing/chart structures. TX Sheet Control also stores a TXWB extension in the ODS package to retain its complete workbook model, including barcodes, cell types, dashboards, mail merge and advanced feature settings.

On import, the filter retains original package parts and XML content. An unchanged workbook can be saved as the original bytes. Editing patches supported source content while keeping unrelated original parts and unhandled XML. This retention also survives a TXWB save and reload. If an edited drawing or feature container cannot be rewritten safely while retaining opaque XML, preservation rejects the export; choose a fresh export explicitly when that is appropriate. Preserved content does not automatically become editable or rendered.

The projection baseline allows supported edits made by another application to override the corresponding TX extension data. Applications that remove private extension parts cannot retain features stored only in those parts. Validate representative documents with the applications in your exchange workflow.

### Export Settings

Preservation is enabled by default. Set `preserveOriginal: false` to create a fresh package from the current workbook. This explicitly omits unprojected original content. Edits to a digitally signed source require this fresh-export choice because modifying the original would invalidate its signature.

```typescript
const ods = await editor.save(StreamType.OpenDocumentSpreadsheet, {
    openDocumentSpreadsheet: {
        preserveOriginal: false,
        documentProperties: { title: 'Quarterly orders' }
    }
});
```

Metadata overrides affect the exported document only. ZIP entry, file, expanded-byte and editable-cell limits are available through `openDocumentSpreadsheet` load settings. The filter does not fetch external resources or execute embedded objects. Encrypted input is rejected. Handle failures before offering a download.

### See Also

- [Loading and Saving Workbooks](https://docs.textcontrol.com/tx-sheet-control/document-processing/load-save/llms-full.txt)
- [Document Properties](https://docs.textcontrol.com/tx-sheet-control/document-processing/properties/llms-full.txt)

---

## Nearby

- **Previous:** [Measuring Performance](https://docs.textcontrol.com/tx-sheet-control/document-processing/performance/llms-full.txt)
- **Next:** [Fonts in Documents](https://docs.textcontrol.com/tx-sheet-control/document-processing/document-fonts/llms-full.txt)
