OdsCell
OfficeIMO.OpenDocument
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
- Method OdsSheet.Cell
- Method OdsSheet.Merge
Methods
public OdsAnnotation AddAnnotation(string text, string? creator = null, DateTimeOffset? date = null, string? name = null) #Adds an annotation to this cell.
Parameters
- text string
- creator string? = null
- date System.DateTimeOffset? = null
- name string? = null
Returns
OdsAnnotationpublic void ClearValue() #Clears value content while retaining style, formula, validation, and annotations.
public void SetCurrency(decimal value, string currencyCode) #Sets a currency amount and ISO currency code.
Parameters
- value decimal
- currencyCode string
public void SetDate(DateTime value) #Sets a local date or date-time value.
Parameters
- value System.DateTime
public void SetDateTime(DateTimeOffset value) #Sets an offset-aware date-time value.
Parameters
- value System.DateTimeOffset
public void SetDecimal(decimal value) #Sets a decimal without a binary floating-point round trip.
Parameters
- value decimal
public void SetDuration(TimeSpan value) #Sets a duration. ODF stores both time-of-day and duration values as ISO durations.
Parameters
- value System.TimeSpan
public void SetHyperlink(string text, string href) #Sets a hyperlink display value without fetching its target.
Parameters
- text string
- href string
public void SetPercentage(decimal value) #Sets a percentage from a fractional value, where 0.25 represents 25%.
Parameters
- value decimal
public void SetTime(TimeSpan value) #Sets a time-of-day using the ODF duration representation.
Parameters
- value System.TimeSpan
public bool TransformTextCase(OfficeTextCase textCase, CultureInfo? culture = null) #Transforms stored string text while retaining the cell style.
Parameters
- textCase OfficeIMO.Drawing.OfficeTextCase
- culture System.Globalization.CultureInfo? = null
Returns
bool true when a string value was transformed; otherwise false.Inherited Methods
Properties
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? NumberFormatName { get; set; } #Referenced number/date/time data style through the cell style.
public OdfTextDecorationStyle? UnderlineStyle { get; set; } #Explicit or inherited native underline pattern.
public OdfTextDecorationType? UnderlineType { get; set; } #Explicit or inherited underline line count.
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 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.