# OdsCellValue

An immutable typed ODS cell value retaining its invariant lexical form.

Struct 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OdsCellValue.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L39)

**Base**

`ValueType`

**Modifiers**

sealed

An immutable typed ODS cell value retaining its invariant lexical form.

## Inheritance

- ValueType
- OdsCellValue

## Usage

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

- Property [OdsCell.Value](/api/open-document/officeimo-opendocument-odscell/#property-value)
- Property [OdsCellRun.Value](/api/open-document/officeimo-opendocument-odscellrun/#property-value)
- Property [OdsCellValue.Empty](/api/open-document/officeimo-opendocument-odscellvalue/#property-empty)
- Method [OdsSheet.GetValue](/api/open-document/officeimo-opendocument-odssheet/#method-getvalue-int64-int64)

Filter members 

Show inherited

## Methods

`public bool AsBoolean()` [#](#method-asboolean)

[OdsCellValue.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L43)

Parses the value as a boolean.

Returns

`bool`

`public DateTimeOffset AsDateTimeOffset()` [#](#method-asdatetimeoffset)

[OdsCellValue.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L47)

Parses the value as an ODF date or date-time.

Returns

`DateTimeOffset`

`public decimal AsDecimal()` [#](#method-asdecimal)

[OdsCellValue.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L39)

Parses the value as a decimal.

Returns

`decimal`

`public double AsDouble()` [#](#method-asdouble)

[OdsCellValue.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L41)

Parses the value as a double.

Returns

`double`

`public TimeSpan AsTimeSpan()` [#](#method-astimespan)

[OdsCellValue.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L49)

Parses the ODF duration used for time and duration cells.

Returns

`TimeSpan`

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

[OdsCellValue.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L51)

Returns the fully qualified type name of this instance.

Returns

`string` The fully qualified type name.

## Inherited Methods

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

Inherited from ValueType

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from ValueType

Returns

`int`

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

Inherited from object

Returns

`Type`

## Properties

`public static OdsCellValue Empty { get; }` [#](#property-empty)

[OdsCellValue.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L29)

Empty value.

`public OdsCellValueKind Kind { get; }` [#](#property-kind)

[OdsCellValue.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L31)

Logical value kind.

`public string LexicalValue { get; }` [#](#property-lexicalvalue)

[OdsCellValue.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L33)

Invariant value as stored in the ODF attribute.

`public string DisplayText { get; }` [#](#property-displaytext)

[OdsCellValue.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L35)

Displayed text stored in cell paragraphs, when available.

`public string? CurrencyCode { get; }` [#](#property-currencycode)

[OdsCellValue.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Spreadsheet/OdsCellValue.cs#L37)

Currency code for currency values.

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