|
||
| 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 Workbook 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.util.Calendar |
getDateTimeValue()
Gets the cell's date time value. |
java.lang.Double |
getDoubleValue()
Gets the cell's double value. |
java.lang.String |
getFormula()
Gets the formula of the cell. |
java.lang.Integer |
getIntValue()
Gets the cell's int value. |
java.lang.String |
getName()
Gets the name of the cell. |
java.lang.String |
getR1C1Formula()
Gets a R1C1 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. |
boolean |
isFormula()
Gets if the specified cell contains formula. |
boolean |
isMerged()
Checks if a cell is part of a merged range or not. |
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 |
setR1C1Formula(java.lang.String r1c1Formula)
Sets a R1C1 formula of the Cell. |
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. |
void |
setValue(java.lang.String stringValue,
boolean isConverted)
Sets a string value into the cell and converts the value to other data type if appropriate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.lang.String getName()
public short getColumnIndex()
public int getRowIndex()
public void clearContent()
CellsException - if the cell has been removed from the worksheet.public void setValue(int intValue)
intValue - value to set to the cell.
CellsException - if the cell has been removed from the worksheet.public void setValue(double doubleValue)
doubleValue - value to set to the cell.
CellsException - if the cell has been removed from the worksheet.public void setValue(java.lang.String stringValue)
stringValue - value to set to the cell.
CellsException - if the cell has been removed from the worksheet.
public void setValue(java.lang.String stringValue,
boolean isConverted)
stringValue - value to set to the cell.isConverted - True: converted to other data type if appropriate.public void setValue(boolean boolValue)
boolValue - value to set to the cell.
CellsException - if the cell has been removed from the worksheet.public void setValue(java.util.Calendar dateTimeValue)
dateTimeValue - value to set to the cell.
CellsException - if the cell has been removed from the worksheet.public void setValue(java.lang.Object objectValue)
objectValue - value to set to the cell.
CellsException - 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.
CellsException - 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.ERROR | Error String. |
public java.lang.Double getDoubleValue()
public java.lang.Integer getIntValue()
public java.util.Calendar getDateTimeValue()
public java.lang.String getStringValue()
public int getValueType()
CellValueTypepublic Style getStyle()
CellsException - 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 boolean isFormula()
public boolean isMerged()
public java.lang.String getFormula()
CellsException - if the cell has been removed from the worksheet.public void setFormula(java.lang.String formula)
formula - formula of the cell. Currently supported Workbook built-in functions are listed below:
CellsException - if the cell has been removed from the worksheet.public java.lang.String getR1C1Formula()
public void setR1C1Formula(java.lang.String r1c1Formula)
r1c1Formula - a R1C1 formula.setFormula(String)
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 | |||||||