# OdsSheet

An XML-backed ODS worksheet with sparse repeat-run editing.

Class 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OdsSheet.cs:186](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L186)

**Modifiers**

sealed

An XML-backed ODS worksheet with sparse repeat-run editing.

## Inheritance

- object
- OdsSheet

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Create and Read ODT, ODS and ODP Files](/docs/open-document/create-read/) Guide
  
  Create OpenDocument text, spreadsheet and presentation files, read their content, edit them in place, and open password-protected files.

## Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 3

- Method [OdsDocument.AddSheet](/api/open-document/officeimo-opendocument-odsdocument/#method-addsheet-string)
- Method [OdsDocument.GetSheet](/api/open-document/officeimo-opendocument-odsdocument/#method-getsheet-string)
- Property [OdsDocument.Sheets](/api/open-document/officeimo-opendocument-odsdocument/#property-sheets)

Filter members 

Show inherited

## Methods

`public OdsChart AddChart(OdsChartType type, string categoriesAddress, IReadOnlyList<OdsChartSeries> series, long anchorRow, long anchorColumn, OdfRect bounds, string? title = null, string? name = null)` [#](#method-addchart-officeimo-opendocument-odscharttype-string-collections-generic-ireadonlylist-officeimo-opendocument-odschartseries-int64-int64-officeimo-opendocument-odfrect-string-string)

[OdsSheet.Charts.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.Charts.cs#L10)

Adds a bounded chart linked to existing ODS cells and anchored in this sheet.

Parameters

**type OfficeIMO.OpenDocument.OdsChartType required**

**categoriesAddress string required**

**series System.Collections.Generic.IReadOnlyList<OfficeIMO.OpenDocument.OdsChartSeries> required**

**anchorRow long required**

**anchorColumn long required**

**bounds OfficeIMO.OpenDocument.OdfRect required**

**title string? = null optional**

**name string? = null optional**

Returns

`OdsChart`

`public OdsCell Cell(long row, long column)` [#](#method-cell-int64-int64)

[OdsSheet.cs:186](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L186)

Gets an editable zero-based cell, splitting only the containing row and cell runs.

Parameters

**row long required**

**column long required**

Returns

`OdsCell`

`public OdsColumn Column(long column)` [#](#method-column-int64)

[OdsSheet.cs:202](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L202)

Gets an editable zero-based column definition, creating a sparse definition when needed.

Parameters

**column long required**

Returns

`OdsColumn`

`public string? GetFormula(long row, long column)` [#](#method-getformula-int64-int64)

[OdsSheet.cs:236](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L236)

Reads a formula without splitting or expanding repeat runs.

Parameters

**row long required**

**column long required**

Returns

`string?`

`public OdsCellValue GetValue(long row, long column)` [#](#method-getvalue-int64-int64)

[OdsSheet.cs:228](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L228)

Reads a value without splitting or expanding repeat runs.

Parameters

**row long required**

**column long required**

Returns

`OdsCellValue`

Merge 2 overloads

`public OdsCell Merge(long row, long column, long rowSpan, long columnSpan)` [#](#method-merge-int64-int64-int64-int64)

[OdsSheet.cs:244](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L244)

Merges a rectangular cell range and marks non-anchor positions as covered cells.

Parameters

**row long required**

**column long required**

**rowSpan long required**

**columnSpan long required**

Returns

`OdsCell`

`public OdsCell Merge(long row, long column, long rowSpan, long columnSpan, long maximumMaterializedCells)` [#](#method-merge-int64-int64-int64-int64-int64)

[OdsSheet.cs:249](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L249)

Merges a rectangular cell range under an explicit materialization bound.

Parameters

**row long required**

**column long required**

**rowSpan long required**

**columnSpan long required**

**maximumMaterializedCells long required**

Returns

`OdsCell`

`public OdsRow Row(long row)` [#](#method-row-int64)

[OdsSheet.cs:196](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L196)

Gets an editable zero-based row, splitting its repeat run without expanding it.

Parameters

**row long required**

Returns

`OdsRow`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Name { get; set; }` [#](#property-name)

[OdsSheet.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L26)

Worksheet name.

`public bool Hidden { get; set; }` [#](#property-hidden)

[OdsSheet.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L38)

Whether the sheet is hidden.

`public IReadOnlyList<OdsChart> Charts { get; }` [#](#property-charts)

[OdsSheet.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L45)

Embedded charts whose chart content can be read safely from this package.

`public string? PrintRanges { get; set; }` [#](#property-printranges)

[OdsSheet.cs:101](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L101)

Optional ODF print range expression.

`public IReadOnlyList<OdsRowRun> RowRuns { get; }` [#](#property-rowruns)

[OdsSheet.cs:106](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L106)

Sparse row runs without expanding table:number-rows-repeated.

`public IReadOnlyList<OdsColumnRun> ColumnRuns { get; }` [#](#property-columnruns)

[OdsSheet.cs:146](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L146)

Sparse column definition runs without expanding repeats.

`public long RowCount { get; }` [#](#property-rowcount)

[OdsSheet.cs:158](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L158)

Logical row count represented by the sparse run model.

`public OdsUsedRange? UsedRange { get; }` [#](#property-usedrange)

[OdsSheet.cs:163](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L163)

Smallest rectangle containing cells with a value, formula, or text.

## Fields

`public const long DefaultMaximumMergeCells` [#](#field-defaultmaximummergecells)

[OdsSheet.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L6)

Default maximum number of cells that one merge operation may materialize.

Value: `100000`

`public const int DefaultMaximumChartFrames` [#](#field-defaultmaximumchartframes)

[OdsSheet.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsSheet.cs#L8)

Maximum number of embedded chart frames projected from one sheet.

Value: `256`

<!-- PowerForge markdown artifact sha256:F19817AE469582D262425F77E19C545F660E7C1AC6E1A6786A4911021782B5DE -->
