Represents a cell in a Microsoft Excel worksheet.
Inheritance
object
- IComparable<WorksheetCell>
Properties
Section titled "Properties"AssociatedDataTable
Section titled "AssociatedDataTable"Gets the data table to which the cell belongs.
public WorksheetDataTable AssociatedDataTable { get; } AssociatedMergedCellsRegion
Section titled "AssociatedMergedCellsRegion"Gets the merged cells region which contains the cell, or null if the cell is not merged.
public WorksheetMergedCellsRegion AssociatedMergedCellsRegion { get; } AssociatedTable
Section titled "AssociatedTable"Gets the to which this cell belongs.
public WorksheetTable AssociatedTable { get; } CellFormat
Section titled "CellFormat"Gets the cell formatting for this cell.
public IWorksheetCellFormat CellFormat { get; } ColumnIndex
Section titled "ColumnIndex"Gets the column index of the cell.
public int ColumnIndex { get; } Comment
Section titled "Comment"Gets or sets the comment applied to the cell.
public WorksheetCellComment Comment { get; set; } DataValidationRule
Section titled "DataValidationRule"Gets or sets the data validation rule for the .
public DataValidationRule DataValidationRule { get; set; } Formula
Section titled "Formula"Gets the formula which has been applied to the cell.
public Formula Formula { get; } HasCellFormat
Section titled "HasCellFormat"Gets the value which indicates whether the cell's format has been initialized yet.
public bool HasCellFormat { get; } HasComment
Section titled "HasComment"Get the value indicating whether the cell has an associated comment.
public bool HasComment { get; } RowIndex
Section titled "RowIndex"Gets the row index of the cell.
public int RowIndex { get; } Value
Section titled "Value"Gets or sets the value of the cell.
public object Value { get; set; } Worksheet
Section titled "Worksheet"Gets the worksheet to which the cell belongs.
public Worksheet Worksheet { get; } Methods
Section titled "Methods"ApplyFormula(string)
Section titled "ApplyFormula(string)"Applies a formula to the cell.
public void ApplyFormula(string value) Parameters
- value:
string
Returns any
Equals(object)
Section titled "Equals(object)"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
GetBoundsInTwips()
Section titled "GetBoundsInTwips()"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
GetHashCode()
Section titled "GetHashCode()"Gets the hash code of the .
public override int GetHashCode() Returns any
GetHyperlink()
Section titled "GetHyperlink()"Gets the effective hyperlink on the cell.
public WorksheetHyperlink GetHyperlink() Returns any
GetResolvedCellFormat()
Section titled "GetResolvedCellFormat()"Gets the resolved cell formatting for this cell.
public IWorksheetCellFormat GetResolvedCellFormat() Returns any
GetText()
Section titled "GetText()"Gets the text displayed in the cell.
public string GetText() Returns any
GetText(TextFormatMode)
Section titled "GetText(TextFormatMode)"Gets the text of the cell.
public string GetText(TextFormatMode textFormatMode) Parameters
- textFormatMode:
TextFormatMode
Returns any
IsCellTypeSupported(Type)
Section titled "IsCellTypeSupported(Type)"Returns True if a particular type of value can be exported to excel.
public static bool IsCellTypeSupported(Type cellType) Parameters
- cellType:
Type
Returns any
ToString()
Section titled "ToString()"Gets the string representation of the address of the cell.
public override string ToString() Returns any
ToString(CellReferenceMode, bool)
Section titled "ToString(CellReferenceMode, bool)"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
ValidateValue()
Section titled "ValidateValue()"Returns a boolean indicating if the value of the cell is valid considering the associated
public bool ValidateValue()