Class GridCell

GridCell class

Represents a cell object.

public class GridCell

Properties

NameDescription
BoolValue { get; }Gets the boolean value contained in the cell.
Column { get; }Gets column number (zero based) of the cell.
DateValue { get; }Gets the DateTime value contained in the cell.
DisplayStringValue { get; }Gets the formatted string value of this cell.
DoubleValue { get; }Gets the double value contained in the cell.
FloatValue { get; }Gets the float value contained in the cell.
Formula { get; set; }Gets or sets a formula of the GridCell.
HtmlString { get; set; }Gets and sets the html string which contains data and some formattings in this cell.
IntValue { get; }Gets the integer value contained in the cell.
IsStyleSet { get; }Indicates if the cell’s style is set. If return false, it means this cell has a default cell format.
Name { get; }Gets the name of the cell. For example: A1, F102.
Row { get; }Gets row number (zero based) of the cell.
StringValue { get; }Gets the string value contained in the cell.
Style { get; set; }Gets the copy of cell style. set the style for the cell.
Type { get; }return the cell value type ,the meaning can see GridCellValueType.java
Value { get; set; }Gets the value contained in this cell.

Methods

NameDescription
ContainsExternalLink()Indicates wether this cell contains an external link. Only applies when the cell is a formula cell.
Copy(GridCell)Copies data from a source cell.
CopyStyle(GridTableItemStyle)copy the style and set the style for the cell
CreateComment(string, string, bool)Creates a comment object for a cell.
CreateValidation(GridValidationType, bool)Creates a validation object for a cell.
override Equals(object)Checks whether this object refers to the same cell with another cell object.
GetComment()Get comment object on this cell
override GetHashCode()Serves as a hash function for a particular type.
GetWidthOfValue()Gets the width of the value in unit of pixels.
IsErrorValue()Checks if a formula can properly evaluate a result.
IsFormula()Represents if the specified cell contains formula.
PutValue(bool)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(int)Puts a int value into the cell.
PutValue(object)Puts an object value into the cell.same as setValue(Object param_object)
PutValue(string)Puts a String value into the cell.
PutValue(string, bool)Puts a string value into the cell and converts the value to other data type if appropriate.
PutValue(string, bool, bool)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.
PutValueAndSetFormatByValue(string)Sets the cell’s value with a string value and set cell format by this value.
RemoveComment()Removes the comment object of the cell.
RemoveValidation()Removes the validation object of the cell.
SetBorder(WebBorderStyle)Sets borders(top,bottom,left and right) for a cell,all the borders have same borderstyle.
SetCustom(string)sets the custom format, null or empty string means no custom format.
SetFormula(string, object)Set the formula and the value of the formula.
SetNumberType(int)set the display format of numbers and dates
ToString()Returns a string represents the current Cell object.
operator ==
operator !=

See Also