Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OdsCell

OfficeIMO.OpenDocument

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

An XML-backed ODS cell produced without expanding surrounding repeat runs.

Inheritance

  • object
  • OdsCell

Usage

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

Methods

public OdsAnnotation AddAnnotation(string text, string? creator = null, DateTimeOffset? date = null, string? name = null) #

Adds an annotation to this cell.

Parameters

text string required
creator string? = null optional
date System.DateTimeOffset? = null optional
name string? = null optional
public void ClearValue() #

Clears value content while retaining style, formula, validation, and annotations.

public void SetBoolean(bool value) #

Sets a boolean value.

Parameters

value bool required
public void SetCurrency(decimal value, string currencyCode) #

Sets a currency amount and ISO currency code.

Parameters

value decimal required
currencyCode string required
public void SetDate(DateTime value) #

Sets a local date or date-time value.

Parameters

value System.DateTime required
public void SetDateTime(DateTimeOffset value) #

Sets an offset-aware date-time value.

Parameters

value System.DateTimeOffset required
public void SetDecimal(decimal value) #

Sets a decimal without a binary floating-point round trip.

Parameters

value decimal required
public void SetDuration(TimeSpan value) #

Sets a duration. ODF stores both time-of-day and duration values as ISO durations.

Parameters

value System.TimeSpan required
public void SetNumber(double value) #

Sets a double value.

Parameters

value double required
public void SetPercentage(decimal value) #

Sets a percentage from a fractional value, where 0.25 represents 25%.

Parameters

value decimal required
public void SetString(string? value) #

Sets a string value and display text.

Parameters

value string? required
public void SetTime(TimeSpan value) #

Sets a time-of-day using the ODF duration representation.

Parameters

value System.TimeSpan required
public bool TransformTextCase(OfficeTextCase textCase, CultureInfo? culture = null) #

Transforms stored string text while retaining the cell style.

Parameters

textCase OfficeIMO.Drawing.OfficeTextCase required
culture System.Globalization.CultureInfo? = null optional

Returns

bool true when a string value was transformed; otherwise false.

Properties

public bool IsCovered { get; } #

True when this position is covered by a merged cell.

public OdsCellValue Value { get; } #

Typed cached value.

public string Text { get; } #

Decoded display text.

public string? Formula { get; set; } #

Raw OpenFormula expression, including any namespace prefix.

public OdsAnnotation? Annotation { get; } #

The annotation attached to this cell, when present.

public IReadOnlyList<OdsAnnotation> Annotations { get; } #

Annotation elements present on this cell. Conforming ODF permits at most one.

public string? StyleName { get; set; } #

Referenced cell style name.

public string? NumberFormatName { get; set; } #

Referenced number/date/time data style through the cell style.

public string? ValidationName { get; set; } #

Referenced content validation rule.

public bool? Bold { get; set; } #

Explicit or inherited bold state.

public bool? Italic { get; set; } #

Explicit or inherited italic state.

public bool? Underline { get; set; } #

Explicit or inherited underline state.

public OdfTextDecorationStyle? UnderlineStyle { get; set; } #

Explicit or inherited native underline pattern.

public OdfTextDecorationType? UnderlineType { get; set; } #

Explicit or inherited underline line count.

public bool? Strikethrough { get; set; } #

Explicit or inherited strikethrough state.

public OdfTextDecorationStyle? LineThroughStyle { get; set; } #

Explicit or inherited native strikethrough pattern.

public OdfTextDecorationType? LineThroughType { get; set; } #

Explicit or inherited strikethrough line count.

public OdfTextPosition? TextPosition { get; set; } #

Explicit or inherited baseline placement.

public OdfTextTransform? TextTransform { get; set; } #

Explicit or inherited display-time case transformation.

public bool? SmallCaps { get; set; } #

Explicit or inherited small-cap display formatting.

public OdfLength? FontSize { get; set; } #

Explicit or inherited font size.

public string? FontFamily { get; set; } #

Explicit or inherited font family.

public OdfColor? Color { get; set; } #

Explicit or inherited text color.

public OdfColor? BackgroundColor { get; set; } #

Explicit or inherited cell background color.

public string? TextAlign { get; set; } #

Explicit or inherited horizontal text alignment token.

public string? TextAlignSource { get; set; } #

Explicit or inherited table-cell horizontal alignment source token.

public string? VerticalAlign { get; set; } #

Explicit or inherited table-cell vertical alignment token.

public string? WrapOption { get; set; } #

Explicit or inherited table-cell wrapping token.