Cell Class |
Namespace: Aspose.Cells
The Cell type exposes the following members.
Name | Description | |
---|---|---|
![]() | BoolValue |
Gets the boolean value contained in the cell.
|
![]() | Column |
Gets column number (zero based) of the cell.
|
![]() | Comment |
Gets the comment of this cell.
|
![]() | ContainsExternalLink |
Indicates whether this cell contains an external link.
Only applies when the cell is a formula cell.
|
![]() | DateTimeValue |
Gets the DateTime value contained in the cell.
|
![]() | DisplayStringValue |
Gets the formatted string value of this cell by cell's display style.
|
![]() | DoubleValue |
Gets the double value contained in the cell.
|
![]() | FloatValue |
Gets the float value contained in the cell.
|
![]() ![]() | Formula |
Gets or sets a formula of the Cell.
|
![]() | FormulaLocal |
Get the locale formatted formula of the cell.
|
![]() | HtmlString |
Gets and sets the html string which contains data and some formats in this cell.
|
![]() | IntValue |
Gets the integer value contained in the cell.
|
![]() | IsArrayFormula |
Indicates whether the cell formula is an array formula.
|
![]() | IsArrayHeader |
Indicates the cell's formula is and array formula
and it is the first cell of the array.
|
![]() | IsErrorValue |
Checks if a formula can properly evaluate a result.
|
![]() | IsFormula |
Represents if the specified cell contains formula.
|
![]() | IsInArray | Obsolete.
Indicates whether the cell formula is an array formula.
|
![]() | IsInTable | Obsolete.
Indicates whether this cell is part of table formula.
|
![]() | IsMerged |
Checks if a cell is part of a merged range or not.
|
![]() | IsNumericValue |
Indicates whether the inner value of this cell is numeric(int, double and datetime)
|
![]() | IsSharedFormula |
Indicates whether the cell formula is part of shared formula.
|
![]() | IsStyleSet |
Indicates if the cell's style is set. If return false, it means this cell has a default cell format.
|
![]() | IsTableFormula |
Indicates whether this cell is part of table formula.
|
![]() | Name |
Gets the name of the cell.
|
![]() | NumberCategoryType |
Represents the category type of this cell's number formatting.
|
![]() | R1C1Formula |
Gets or sets a R1C1 formula of the Cell.
|
![]() | Row |
Gets row number (zero based) of the cell.
|
![]() | SharedStyleIndex |
Gets cell's shared style index in the style pool.
|
![]() | StringValue |
Gets the string value contained in the cell. If the type of this cell is string, then return the string value itself.
For other cell types, the formatted string value (formatted with the specified style of this cell) will be returned.
The formatted cell value is same with what you can get from excel when copying a cell as text(such as
copying cell to text editor or exporting to csv).
|
![]() | StringValueWithoutFormat | Obsolete.
Gets cell's value as string without any format.
|
![]() | Type |
Represents cell value type.
|
![]() | Value |
Gets the value contained in this cell.
|
![]() | Worksheet |
Gets the parent worksheet.
|
Name | Description | |
---|---|---|
![]() | Calculate(CalculationOptions) |
Calculates the formula of the cell.
|
![]() | Calculate(Boolean, ICustomFunction) | Obsolete.
Calculates the formula of the cell.
|
![]() ![]() | Characters |
Returns a Characters object that represents a range of characters within the cell text.
|
![]() | Copy |
Copies data from a source cell.
|
![]() | Equals(Object) |
Checks whether this object refers to the same cell with another.
(Overrides ObjectEquals(Object).) |
![]() | Equals(Cell) |
Checks whether this object refers to the same cell with another cell object.
|
![]() | Finalize | (Inherited from Object.) |
![]() | GetArrayRange |
Gets the array range if the cell's formula is an array formula.
|
![]() | GetCharacters |
Returns all Characters objects
that represents a range of characters within the cell text.
|
![]() | GetCharacters(Boolean) |
Returns all Characters objects
that represents a range of characters within the cell text.
|
![]() | GetConditionalFormattingResult |
Get the result of the conditional formatting.
|
![]() | GetDependents |
Get all cells which reference to the specific cell.
|
![]() | GetDisplayStyle |
Gets the display style of the cell.
If this cell is also affected by other settings such as conditional formatting, list objects, etc.,
then the display style may be different from cell.GetStyle().
|
![]() | GetDisplayStyle(Boolean) |
Gets the display style of the cell.
If the cell is conditional formatted, the display style is not same as the cell.GetStyle().
|
![]() | GetFormatConditions |
Gets format conditions which applies to this cell.
|
![]() | GetFormula |
Get the formula of this cell.
|
![]() | GetHashCode |
Serves as a hash function for a particular type.
(Overrides ObjectGetHashCode.) |
![]() | GetHeightOfValue |
Gets the height of the value in unit of pixels.
|
![]() | GetHtmlString |
Gets the html string which contains data and some formats in this cell.
|
![]() | GetLeafs |
Get all cells which reference to this cell directly and need to be updated when this cell is modified.
|
![]() | GetLeafs(Boolean) |
Get all cells which will be updated when this cell is modified.
|
![]() | GetMergedRange |
Returns a Range object which represents a merged range.
|
![]() ![]() | GetPrecedents |
Gets all cells or ranges which this cell's formula depends on.
|
![]() | GetStringValue |
Gets the string value by specific formatted strategy.
|
![]() | GetStyle |
Gets the cell style.
|
![]() | GetStyle(Boolean) |
If checkBorders is true, check whether other cells' borders will effect the style of this cell.
|
![]() | GetTable |
Gets the table which contains this cell.
|
![]() | GetType | (Inherited from Object.) |
![]() | GetValidation |
Gets the validation applied to this cell.
|
![]() | GetValidationValue |
Gets the value of validation which applied to this cell.
|
![]() | GetWidthOfValue |
Gets the width of the value in unit of pixels.
|
![]() | IsRichText |
Indicates whether the cell string value is a rich text.
|
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | PutValue(Boolean) |
Puts a boolean value into the cell.
|
![]() | PutValue(DateTime) |
Puts a DateTime value into the cell.
|
![]() | PutValue(Double) |
Puts a double value into the cell.
|
![]() | PutValue(Int32) |
Puts an integer value into the cell.
|
![]() | PutValue(Object) |
Puts an object value into the cell.
|
![]() | PutValue(String) |
Puts a string value into the cell.
|
![]() | PutValue(String, Boolean) |
Puts a string value into the cell and converts the value to other data type if appropriate.
|
![]() | PutValue(String, Boolean, Boolean) |
Puts a value into the cell, if appropriate the value will be converted to other data type and cell's number format will be reset.
|
![]() | RemoveArrayFormula |
Remove array formula.
|
![]() | SetArrayFormula(String, Int32, Int32) |
Sets an array formula(legacy array formula entered via CTRL+SHIFT+ENTER in ms excel) to a range of cells.
|
![]() | SetArrayFormula(String, Int32, Int32, FormulaParseOptions) |
Sets an array formula to a range of cells.
|
![]() | SetArrayFormula(String, Int32, Int32, FormulaParseOptions, Object) |
Sets an array formula to a range of cells.
|
![]() | SetArrayFormula(String, Int32, Int32, Boolean, Boolean) | Obsolete.
Sets an array formula to a range of cells.
|
![]() | SetCharacters |
Sets rich text format of the cell.
|
![]() | SetDynamicArrayFormula(String, FormulaParseOptions, Boolean) |
Sets dynamic array formula and make the formula spill into neighboring cells if possible.
|
![]() | SetDynamicArrayFormula(String, FormulaParseOptions, Object, Boolean, Boolean) |
Sets dynamic array formula and make the formula spill into neighboring cells if possible.
|
![]() | SetFormula(String, Object) |
Set the formula and the value of the formula.
|
![]() | SetFormula(String, FormulaParseOptions, Object) |
Set the formula and the value of the formula.
|
![]() | SetFormula(String, Boolean, Boolean, Object) | Obsolete.
Set the formula and the value of the formula.
|
![]() | SetSharedFormula(String, Int32, Int32) |
Sets a formula to a range of cells.
|
![]() | SetSharedFormula(String, Int32, Int32, FormulaParseOptions) |
Sets a formula to a range of cells.
|
![]() | SetSharedFormula(String, Int32, Int32, FormulaParseOptions, Object) |
Sets a formula to a range of cells.
|
![]() | SetSharedFormula(String, Int32, Int32, Boolean, Boolean) | Obsolete.
Sets a formula to a range of cells.
|
![]() | SetStyle(Style) |
Sets the cell style.
|
![]() | SetStyle(Style, StyleFlag) |
Apply the cell style.
|
![]() | SetStyle(Style, Boolean) |
Apply the cell style.
|
![]() | ToString |
Returns a string represents the current Cell object.
(Overrides ObjectToString.) |
[C#] Workbook excel = new Workbook(); Cells cells = excel.Worksheets[0].Cells; //Put a string into a cell Cell cell = cells[0, 0]; cell.PutValue("Hello"); string first = cell.StringValue; //Put an integer into a cell cell = cells["B1"]; cell.PutValue(12); int second = cell.IntValue; //Put a double into a cell cell = cells[0, 2]; cell.PutValue(-1.234); double third = cell.DoubleValue; //Put a formula into a cell cell = cells["D1"]; cell.Formula = "=B1 + C1"; //Put a combined formula: "sum(average(b1,c1), b1)" to cell at b2 cell = cells["b2"]; cell.Formula = "=sum(average(b1,c1), b1)"; //Set style of a cell Style style = cell.GetStyle(); //Set background color style.BackgroundColor = Color.Yellow; //Set format of a cell style.Font.Name = "Courier New"; style.VerticalAlignment = TextAlignmentType.Top; cell.SetStyle(style); [Visual Basic] Dim excel as Workbook = new Workbook() Dim cells as Cells = exce.Worksheets(0).Cells 'Put a string into a cell Dim cell as Cell = cells(0, 0) cell.PutValue("Hello") Dim first as String = cell.StringValue //Put an integer into a cell cell = cells("B1") cell.PutValue(12) Dim second as Integer = cell.IntValue //Put a double into a cell cell = cells(0, 2) cell.PutValue(-1.234) Dim third as Double = cell.DoubleValue //Put a formula into a cell cell = cells("D1") cell.Formula = "=B1 + C1" //Put a combined formula: "sum(average(b1,c1), b1)" to cell at b2 cell = cells("b2") cell.Formula = "=sum(average(b1,c1), b1)" //Set style of a cell Dim style as Style = cell.GetStyle() //Set background color style.BackgroundColor = Color.Yellow //Set font of a cell style.Font.Name = "Courier New" style.VerticalAlignment = TextAlignmentType.Top cell.SetStyle(style)