Represents a cell in a Microsoft Excel worksheet.

Inheritance

object
Implements
  • IComparable<WorksheetCell>

Gets the data table to which the cell belongs.

public WorksheetDataTable AssociatedDataTable { get; }

Gets the merged cells region which contains the cell, or null if the cell is not merged.

public WorksheetMergedCellsRegion AssociatedMergedCellsRegion { get; }

Gets the to which this cell belongs.

public WorksheetTable AssociatedTable { get; }

Gets the cell formatting for this cell.

public IWorksheetCellFormat CellFormat { get; }

Gets the column index of the cell.

public int ColumnIndex { get; }

Gets or sets the comment applied to the cell.

public WorksheetCellComment Comment { get; set; }

Gets or sets the data validation rule for the .

public DataValidationRule DataValidationRule { get; set; }

Gets the formula which has been applied to the cell.

public Formula Formula { get; }

Gets the value which indicates whether the cell's format has been initialized yet.

public bool HasCellFormat { get; }

Get the value indicating whether the cell has an associated comment.

public bool HasComment { get; }

Gets the row index of the cell.

public int RowIndex { get; }

Gets or sets the value of the cell.

public object Value { get; set; }

Gets the worksheet to which the cell belongs.

public Worksheet Worksheet { get; }

Applies a formula to the cell.

public void ApplyFormula(string value)

Parameters

  • value: string

Returns any

Determines whether the specified object is another instance which refers to the same location on the same worksheet as this cell.

public override bool Equals(object obj)

Parameters

  • obj: object

Returns any

Gets the bounds of the cell in twips (1/20th of a point).

public Rect GetBoundsInTwips()

Returns any

GetBoundsInTwips(PositioningOptions)

Section titled "GetBoundsInTwips(PositioningOptions)"

Gets the bounds of the cell in twips (1/20th of a point).

public Rect GetBoundsInTwips(PositioningOptions options)

Parameters

  • options: PositioningOptions

Returns any

GetCellAddressString(WorksheetRow, int, CellReferenceMode, bool)

Section titled "GetCellAddressString(WorksheetRow, int, CellReferenceMode, bool)"

Gets the string representation of the address of the cell.

public static string GetCellAddressString(WorksheetRow worksheetRow, int columnIndex, CellReferenceMode cellReferenceMode, bool includeWorksheetName)

Parameters

  • worksheetRow: WorksheetRow
  • columnIndex: int
  • cellReferenceMode: CellReferenceMode
  • includeWorksheetName: bool

Returns any

GetCellAddressString(WorksheetRow, int, CellReferenceMode, bool, bool, bool)

Section titled "GetCellAddressString(WorksheetRow, int, CellReferenceMode, bool, bool, bool)"

Gets the string representation of the address of the cell.

public static string GetCellAddressString(WorksheetRow worksheetRow, int columnIndex, CellReferenceMode cellReferenceMode, bool includeWorksheetName, bool useRelativeColumn, bool useRelativeRow)

Parameters

  • worksheetRow: WorksheetRow
  • columnIndex: int
  • cellReferenceMode: CellReferenceMode
  • includeWorksheetName: bool
  • useRelativeColumn: bool
  • useRelativeRow: bool

Returns any

Gets the hash code of the .

public override int GetHashCode()

Returns any

Gets the effective hyperlink on the cell.

public WorksheetHyperlink GetHyperlink()

Returns any

Gets the resolved cell formatting for this cell.

public IWorksheetCellFormat GetResolvedCellFormat()

Returns any

Gets the text displayed in the cell.

public string GetText()

Returns any

Gets the text of the cell.

public string GetText(TextFormatMode textFormatMode)

Parameters

  • textFormatMode: TextFormatMode

Returns any

Returns True if a particular type of value can be exported to excel.

public static bool IsCellTypeSupported(Type cellType)

Parameters

  • cellType: Type

Returns any

Gets the string representation of the address of the cell.

public override string ToString()

Returns any

Gets the string representation of the address of the cell.

public string ToString(CellReferenceMode cellReferenceMode, bool includeWorksheetName)

Parameters

  • cellReferenceMode: CellReferenceMode
  • includeWorksheetName: bool

Returns any

ToString(CellReferenceMode, bool, bool, bool)

Section titled "ToString(CellReferenceMode, bool, bool, bool)"

Gets the string representation of the address of the cell.

public string ToString(CellReferenceMode cellReferenceMode, bool includeWorksheetName, bool useRelativeColumn, bool useRelativeRow)

Parameters

  • cellReferenceMode: CellReferenceMode
  • includeWorksheetName: bool
  • useRelativeColumn: bool
  • useRelativeRow: bool

Returns any

Returns a boolean indicating if the value of the cell is valid considering the associated

public bool ValidateValue()

Returns any