![]() |
||
Home Products Purchase Downloads Demos Forums Blogs Ticket Wiki API Corporate |
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.cells.Cell
public class Cell
Encapsulates the object that represents a single Excel cell.
Method Summary | |
---|---|
void |
clearContent()
Clear the content of the cell. |
Characters[] |
getCharacters()
Gets the rich text settings of a cell. |
short |
getColumnIndex()
Gets the column index of the cell. |
java.lang.String |
getFormula()
Gets the formula of the cell. |
int |
getRowIndex()
Gets the row index of the cell. |
java.lang.String |
getStringValue()
Gets the string value contained in the cell. |
Style |
getStyle()
Gets the style of the cell. |
java.lang.Object |
getValue()
Gets the cell's value. |
int |
getValueType()
Gets the cell's value type. |
void |
removeArrayFormula()
Remove an array formula in a range of cells. |
void |
setArrayFormula(java.lang.String arrayFormula,
int rowNumber,
int columnNumber)
Sets an array formula to a range of cells. |
void |
setCharacters(int startIndex,
int length,
Font font)
Performs rich text formatting. |
void |
setFormula(java.lang.String formula)
Sets the formula of the cell at runtime. |
void |
setStyle(Style style)
Sets the cell a style. |
void |
setValue(boolean boolValue)
Sets the cell a boolean value. |
void |
setValue(java.util.Calendar dateTimeValue)
Sets the cell a datetime value. |
void |
setValue(double doubleValue)
Sets the cell a double value. |
void |
setValue(int intValue)
Sets the cell an int value. |
void |
setValue(java.lang.Object objectValue)
Sets the cell an object value. |
void |
setValue(java.lang.String stringValue)
Sets the cell a string value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public short getColumnIndex()
public int getRowIndex()
public void clearContent()
ExcelException
- if the cell has been removed from the worksheet.public void setValue(int intValue)
intValue
- value to set to the cell.
ExcelException
- if the cell has been removed from the worksheet.public void setValue(double doubleValue)
doubleValue
- value to set to the cell.
ExcelException
- if the cell has been removed from the worksheet.public void setValue(java.lang.String stringValue)
stringValue
- value to set to the cell.
ExcelException
- if the cell has been removed from the worksheet.public void setValue(boolean boolValue)
boolValue
- value to set to the cell.
ExcelException
- if the cell has been removed from the worksheet.public void setValue(java.util.Calendar dateTimeValue)
dateTimeValue
- value to set to the cell.
ExcelException
- if the cell has been removed from the worksheet.public void setValue(java.lang.Object objectValue)
objectValue
- value to set to the cell.
ExcelException
- if the cell has bean removed from the worksheet.
java.lang.IllegalArgumentException
- if the cell value type is unkown.public void setCharacters(int startIndex, int length, Font font)
startIndex
- start index.length
- character counts.
If length is negative, all characters after the start index are formatted.
If length is 0, no characters is formatted.font
- font for the specified range. It can be null which means cell's font is used.
ExcelException
- if the cell has been removed from the worksheet, or the cell does
not have a string value.public Characters[] getCharacters()
public java.lang.Object getValue()
cell value type | returned value type |
---|---|
CellValueType.NULL | null |
CellValueType.BOOLEAN | Boolean |
CellValueType.DATETIME | Calendar |
CellValueType.STRING | String |
CellValueType.INT | Integer |
CellValueType.DOUBLE | Double |
CellValueType.RICH_TEXT_STRING | String |
CellValueType.FORMULA | undefined. currently returns null. |
public java.lang.String getStringValue()
public int getValueType()
CellValueType
public Style getStyle()
ExcelException
- if the cell has been removed from the worksheet.public void setStyle(Style style)
style
- the style. Use null to clear the cell's style setting.public java.lang.String getFormula()
ExcelException
- if the cell has been removed from the worksheet.public void setFormula(java.lang.String formula)
formula
- formula of the cell. Currently supported Excel built-in functions are listed below:
ExcelException
- if the cell has been removed from the worksheet.public void setArrayFormula(java.lang.String arrayFormula, int rowNumber, int columnNumber)
arrayFormula
- Array formula.rowNumber
- Number of rows to populate result of the array formula.columnNumber
- Number of columns to populate result of the array formula.public void removeArrayFormula()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |