API Reference

Class

OdsCell

Namespace OfficeIMO.OpenDocument
Assembly OfficeIMO.OpenDocument
Modifiers sealed

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

Inheritance

  • Object
  • OdsCell

Usage

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

Returned or exposed by

Methods

public OdsAnnotation AddAnnotation(String text, String creator = null, Nullable<DateTimeOffset> date = null, String name = null) #
Returns: OdsAnnotation

Adds an annotation to this cell.

Parameters

text System.String requiredposition: 0
creator System.String = null optionalposition: 1
date System.Nullable{System.DateTimeOffset} = null optionalposition: 2
name System.String = null optionalposition: 3
public Void ClearValue() #
Returns: Void

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

public Void SetBoolean(Boolean value) #
Returns: Void

Sets a boolean value.

Parameters

value System.Boolean requiredposition: 0
public Void SetCurrency(Decimal value, String currencyCode) #
Returns: Void

Sets a currency amount and ISO currency code.

Parameters

value System.Decimal requiredposition: 0
currencyCode System.String requiredposition: 1
public Void SetDate(DateTime value) #
Returns: Void

Sets a local date or date-time value.

Parameters

value System.DateTime requiredposition: 0
public Void SetDateTime(DateTimeOffset value) #
Returns: Void

Sets an offset-aware date-time value.

Parameters

value System.DateTimeOffset requiredposition: 0
public Void SetDecimal(Decimal value) #
Returns: Void

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

Parameters

value System.Decimal requiredposition: 0
public Void SetDuration(TimeSpan value) #
Returns: Void

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

Parameters

value System.TimeSpan requiredposition: 0
public Void SetNumber(Double value) #
Returns: Void

Sets a double value.

Parameters

value System.Double requiredposition: 0
public Void SetPercentage(Decimal value) #
Returns: Void

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

Parameters

value System.Decimal requiredposition: 0
public Void SetString(String value) #
Returns: Void

Sets a string value and display text.

Parameters

value System.String requiredposition: 0
public Void SetTime(TimeSpan value) #
Returns: Void

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

Parameters

value System.TimeSpan requiredposition: 0
public Boolean TransformTextCase(OfficeTextCase textCase, CultureInfo culture = null) #
Returns: Boolean

Transforms stored string text while retaining the cell style.

Parameters

textCase OfficeIMO.Drawing.OfficeTextCase requiredposition: 0
culture System.Globalization.CultureInfo = null optionalposition: 1

Returns

true when a string value was transformed; otherwise false.

Properties

public Boolean 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 Nullable<Boolean> Bold { get; set; } #

Explicit or inherited bold state.

public Nullable<Boolean> Italic { get; set; } #

Explicit or inherited italic state.

public Nullable<Boolean> Underline { get; set; } #

Explicit or inherited underline state.

public Nullable<OdfTextDecorationStyle> UnderlineStyle { get; set; } #

Explicit or inherited native underline pattern.

public Nullable<OdfTextDecorationType> UnderlineType { get; set; } #

Explicit or inherited underline line count.

public Nullable<Boolean> StrikeThrough { get; set; } #

Explicit or inherited strikethrough state.

public Nullable<OdfTextDecorationStyle> LineThroughStyle { get; set; } #

Explicit or inherited native strikethrough pattern.

public Nullable<OdfTextDecorationType> LineThroughType { get; set; } #

Explicit or inherited strikethrough line count.

public Nullable<OdfTextPosition> TextPosition { get; set; } #

Explicit or inherited baseline placement.

public Nullable<OdfTextTransform> TextTransform { get; set; } #

Explicit or inherited display-time case transformation.

public Nullable<Boolean> SmallCaps { get; set; } #

Explicit or inherited small-cap display formatting.

public Nullable<OdfLength> FontSize { get; set; } #

Explicit or inherited font size.

public String FontFamily { get; set; } #

Explicit or inherited font family.

public Nullable<OdfColor> Color { get; set; } #

Explicit or inherited text color.

public Nullable<OdfColor> BackgroundColor { get; set; } #

Explicit or inherited cell background color.