Show / Hide Table of Contents

Class Cell

Represents a cell in a sheet.

Inheritance
System.Object
AbstractFormattable
Cell
Implements
IEnumerable<System.Object>
Inherited Members
AbstractFormattable.Alignment
AbstractFormattable.Fill
AbstractFormattable.Font
AbstractFormattable.Format
AbstractFormattable.IsLocked
AbstractFormattable.IsFormulaHidden
AbstractFormattable.Borders
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public class Cell : AbstractFormattable, ICellEnumerator, IDependencyNode, IArray, IEnumerable<object>, ICell

Properties

AbsoluteLabel

Gets the absolute address label of the cell.

Declaration
public string AbsoluteLabel { get; }
Property Value
Type Description
System.String
Remarks

For example: $A$1

Address

Declaration
public CellAddress Address { get; }
Property Value
Type Description
CellAddress

ArrayFormulaRange

Gets the range of the array formula. Returns null if the the formula is not an array formula

Declaration
public Range ArrayFormulaRange { get; }
Property Value
Type Description
Range

Column

Get the column which contains the current cell.

Declaration
public Column Column { get; }
Property Value
Type Description
Column

ColumnCount

Declaration
public int ColumnCount { get; }
Property Value
Type Description
System.Int32

Comment

Get or set the comment of the cell.

Declaration
public Comment Comment { get; set; }
Property Value
Type Description
Comment

DateValue

Declaration
public DateTime? DateValue { get; set; }
Property Value
Type Description
System.Nullable<DateTime>

DisplayBorders

Get the displayed borders of the cell.

Declaration
public AbstractBorders DisplayBorders { get; }
Property Value
Type Description
AbstractBorders
Remarks

If the cell has conditional formatting applied with border formatting and the cell value fulfills the critera it returns t

DisplayFill

Get the displayed background fill of the cell

Declaration
public CellFill DisplayFill { get; }
Property Value
Type Description
CellFill

DisplayFont

Get the displayed font weight of the cell.

Declaration
public AbstractFont DisplayFont { get; }
Property Value
Type Description
AbstractFont

DisplayHorizontalAlignment

Gets the Horizontal Alignment of the cell as it is displayed.

Declaration
public HorizontalCellAlignment DisplayHorizontalAlignment { get; }
Property Value
Type Description
HorizontalCellAlignment

FormattedValue

Gets the string representation of the cell as formatted and displayed.

Declaration
public string FormattedValue { get; }
Property Value
Type Description
System.String

Formula

Get or set the formula of the cell. Changing the cell may also change the value.

Declaration
public string Formula { get; set; }
Property Value
Type Description
System.String

HasContent

Declaration
public bool HasContent { get; }
Property Value
Type Description
System.Boolean

Hyperlink

Get or set the hyperlink of the current cell

Declaration
public Hyperlink Hyperlink { get; set; }
Property Value
Type Description
Hyperlink

InlineRichText

Gets the rich value

Declaration
public RichTextParagraph InlineRichText { get; set; }
Property Value
Type Description
RichTextParagraph

IntValue

Declaration
public int IntValue { get; }
Property Value
Type Description
System.Int32

Item[Int32, Int32]

Declaration
public object this[int row, int column] { get; }
Parameters
Type Name Description
System.Int32 row
System.Int32 column
Property Value
Type Description
System.Object

Label

Gets the address label of the cell.

Declaration
public string Label { get; }
Property Value
Type Description
System.String
Remarks

For example: A1

LocalizedFormula

Set or get the formula in the current locale.

Declaration
public string LocalizedFormula { get; set; }
Property Value
Type Description
System.String

Phonetics

Declaration
public PhoneticText Phonetics { get; set; }
Property Value
Type Description
PhoneticText

RichText

Gets the rich value

Declaration
public RichTextParagraph RichText { get; set; }
Property Value
Type Description
RichTextParagraph

Row

Get the row which contains the current cell.

Declaration
public Row Row { get; }
Property Value
Type Description
Row

RowCount

Declaration
public int RowCount { get; }
Property Value
Type Description
System.Int32

StringValueType

Gets the string value type of the cell.

Declaration
public StringValueType StringValueType { get; }
Property Value
Type Description
StringValueType

Style

Get or get the style of the row or column

Declaration
public override CellStyle Style { get; set; }
Property Value
Type Description
CellStyle
Overrides
AbstractFormattable.Style

Tag

Gets or sets an arbitrary object value that can be used to store custom information about this cell.

Declaration
public object Tag { get; set; }
Property Value
Type Description
System.Object

TimeSpanValue

Declaration
public TimeSpan? TimeSpanValue { get; set; }
Property Value
Type Description
System.Nullable<TimeSpan>

Value

Get or set the value of the cell.

Declaration
public object Value { get; set; }
Property Value
Type Description
System.Object

ValueType

Gets the value type of the cell.

Declaration
public ValueType ValueType { get; }
Property Value
Type Description
ValueType

Worksheet

Get the sheet which contains the current cell.

Declaration
public override Worksheet Worksheet { get; }
Property Value
Type Description
Worksheet
Overrides
AbstractFormattable.Worksheet

Methods

AddComment(String, RichTextParagraph)

Declaration
public void AddComment(string author, RichTextParagraph richText)
Parameters
Type Name Description
System.String author
RichTextParagraph richText

AddComment(String, String)

Declaration
public void AddComment(string author, string text)
Parameters
Type Name Description
System.String author
System.String text

AddConditionalFormatting(ConditionalFormatting)

Declaration
public void AddConditionalFormatting(ConditionalFormatting conditionalFormatting)
Parameters
Type Name Description
ConditionalFormatting conditionalFormatting

GetBoolean()

Gets the Boolean value of the cell.

Declaration
public bool GetBoolean()
Returns
Type Description
System.Boolean

GetComplex()

Declaration
public Complex GetComplex()
Returns
Type Description
Complex

GetDateTime()

Declaration
public DateTime GetDateTime()
Returns
Type Description
DateTime

GetDouble()

Declaration
public double GetDouble()
Returns
Type Description
System.Double

GetEnumerator()

Declaration
public IEnumerator<object> GetEnumerator()
Returns
Type Description
IEnumerator<System.Object>

GetInt32()

Declaration
public double GetInt32()
Returns
Type Description
System.Double

GetString()

Declaration
public string GetString()
Returns
Type Description
System.String

Select()

Set the ActiveCell and Selection to this cell.

Declaration
public void Select()

SetValue(DateTime)

Declaration
public void SetValue(DateTime value)
Parameters
Type Name Description
DateTime value

SetValue(Boolean)

Declaration
public void SetValue(bool value)
Parameters
Type Name Description
System.Boolean value

SetValue(Double)

Declaration
public void SetValue(double value)
Parameters
Type Name Description
System.Double value

SetValue(String)

Declaration
public void SetValue(string value)
Parameters
Type Name Description
System.String value

ToString()

Returns a System.String that represents the current System.Object.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents the current System.Object.

Operators

Addition(Cell, CellRelativeAddress)

Declaration
public static Cell operator +(Cell cell, CellRelativeAddress offset)
Parameters
Type Name Description
Cell cell
CellRelativeAddress offset
Returns
Type Description
Cell

Implements

IEnumerable<>
Back to top Generated by DocFX