Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OdsDocument

OfficeIMO.OpenDocument

Namespace
OfficeIMO.OpenDocument
Assembly
OfficeIMO.OpenDocument
Source revision
be6c300e4ab1 with working tree changes
Implements
IDisposable
Modifiers
sealed

Native OpenDocument Spreadsheet document.

Inheritance

Usage

Explore 6 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 4

Accepted by parameters 2

Methods

public OdsDataStyle AddCurrencyStyle(string name, string currencySymbol, int decimalPlaces = 2, bool useGrouping = false) #

Adds a currency style with a visible currency symbol or code.

Parameters

name string required
currencySymbol string required
decimalPlaces int = 2 optional
useGrouping bool = false optional
public OdsDataPilotTable AddDataPilotTable(string name, string sourceRangeAddress, string targetRangeAddress) #

Adds a local-range ODF data pilot table; the caller supplies the complete output range.

Parameters

name string required
sourceRangeAddress string required
targetRangeAddress string required
public OdsDataStyle AddDateStyle(string name) #

Adds an ISO-style year-month-day date format.

Parameters

name string required
public OdsNamedRange AddNamedRange(string name, string cellRangeAddress, string? baseCellAddress = null) #

Adds a workbook-scoped named range using ODF address syntax.

Parameters

name string required
cellRangeAddress string required
baseCellAddress string? = null optional
public OdsDataStyle AddNumberStyle(string name, int decimalPlaces = 2, bool useGrouping = false) #

Adds a decimal number style.

Parameters

name string required
decimalPlaces int = 2 optional
useGrouping bool = false optional
public OdsDataStyle AddPercentageStyle(string name, int decimalPlaces = 2, bool useGrouping = false) #

Adds a percentage style.

Parameters

name string required
decimalPlaces int = 2 optional
useGrouping bool = false optional
public OdsSheet AddSheet(string name) #

Adds an empty worksheet.

Parameters

name string required

Returns

OdsSheet
public OdsDataStyle AddTimeStyle(string name) #

Adds a 24-hour time format with seconds.

Parameters

name string required
AddValidation 2 overloads
public OdsValidation AddValidation(string name, string condition, bool allowEmptyCell = true) #

Adds a validation rule with a preserved ODF condition expression.

Parameters

name string required
condition string required
allowEmptyCell bool = true optional
public OdsValidation AddValidation(string name, OdsValidationConditionSyntax condition, bool allowEmptyCell = true) #

Adds a validation rule from typed interoperable condition syntax.

Parameters

name string required
condition OfficeIMO.OpenDocument.OdsValidationConditionSyntax required
allowEmptyCell bool = true optional
public static OdsDocument Create() #

Creates an empty ODF 1.4 spreadsheet.

public OdsSheet? GetSheet(string name) #

Finds a worksheet by its case-sensitive name.

Parameters

name string required

Returns

OdsSheet?
Load 2 overloads
public static OdsDocument Load(string path, OdfLoadOptions? options = null) #

Loads an ODS document from a path.

Parameters

path string required
options OfficeIMO.OpenDocument.OdfLoadOptions? = null optional
public static OdsDocument Load(Stream stream, OdfLoadOptions? options = null) #

Loads an ODS document from a stream.

Parameters

stream System.IO.Stream required
options OfficeIMO.OpenDocument.OdfLoadOptions? = null optional
LoadAsync 2 overloads
public static async Task<OdsDocument> LoadAsync(string path, OdfLoadOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously loads an ODS document from a path.

Parameters

path string required
options OfficeIMO.OpenDocument.OdfLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OdsDocument>
public static async Task<OdsDocument> LoadAsync(Stream stream, OdfLoadOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously loads an ODS document from a caller-owned stream.

Parameters

stream System.IO.Stream required
options OfficeIMO.OpenDocument.OdfLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OdsDocument>
LoadFlatXml 2 overloads
public static OdsDocument LoadFlatXml(Stream stream, OdfLoadOptions? options = null) #

Loads a flat OpenDocument Spreadsheet XML stream.

Parameters

stream System.IO.Stream required
options OfficeIMO.OpenDocument.OdfLoadOptions? = null optional
public static OdsDocument LoadFlatXml(string path, OdfLoadOptions? options = null) #

Loads a flat OpenDocument Spreadsheet XML path.

Parameters

path string required
options OfficeIMO.OpenDocument.OdfLoadOptions? = null optional
public void MoveSheet(string name, int newIndex) #

Moves a worksheet to a zero-based position.

Parameters

name string required
newIndex int required
public OdsRecalculationReport Recalculate(OdsFormulaEvaluationOptions? options = null) #

Evaluates the supported OpenFormula subset and updates cached values within configured bounds.

Parameters

options OfficeIMO.OpenDocument.OdsFormulaEvaluationOptions? = null optional
public bool RemoveSheet(string name) #

Removes a worksheet.

Parameters

name string required

Returns

bool

Properties

public IReadOnlyList<OdsDataStyle> DataStyles { get; } #

Number and date/time styles available in this spreadsheet.

public IReadOnlyList<OdsSheet> Sheets { get; } #

Worksheets in document order.

public IReadOnlyList<OdsNamedRange> NamedRanges { get; } #

Named ranges stored at workbook scope.

public IReadOnlyList<OdsValidation> Validations { get; } #

Content validation rules stored at workbook scope.

public IReadOnlyList<OdsDataPilotTable> DataPilotTables { get; } #

Native data pilot tables in document order.