Package io.keikai.model
Interface SCell
- All Superinterfaces:
CellStyleHolder,FormulaContent
- All Known Implementing Classes:
AbstractCellAdv,CellImpl
Represent a cell of a sheet in a Spreadsheet. A cell contains value and style (
CellStyle), and its type is one of SCell.CellType.- Since:
- 3.5.0
- Author:
- dennis
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidclear cell value , reset it to blankvoidDelete the comment associated with this cell.Only valid for array formula cellsGets the boolean valueintGets the date value that is transfered by the double number value.Return the rich text value. if this cell is a simple string value, it will return a read-only rich-text which wraps string-value and current font.intgetSheet()getType()getValue()booleanisNull()Because you always get a not-null cell object, use this method to judge the cell is really null or not.booleanbooleanCheck if this cell contains a rich-text valuevoidsetBooleanValue(Boolean bool) voidsetComment(SComment comment) voidsetDateValue(Date date) Sets the number value a date instance, it will transfer the date to double valuevoidsetErrorValue(ErrorValue errorValue) voidsetFormulaValue(String formula) set formula with string without '=', e.g.voidsetHyperlink(SHyperlink hyperlink) Set or clear a hyperlinkvoidsetNumberValue(Double number) voidsetStringValue(String value) Set string value, if the value start with '=', then it sets as formulasetupHyperlink(SHyperlink.HyperlinkType type, String address, String label) setup a hyperlinkSetup a rich text value(Create a new one if the old value is not a rich-text) and return the instance which to be edited.voidMethods inherited from interface io.keikai.model.CellStyleHolder
getCellStyle, getCellStyle, setCellStyleMethods inherited from interface io.keikai.model.FormulaContent
clearFormulaResultCache, isFormulaParsingError
-
Method Details
-
getSheet
SSheet getSheet() -
getFormulaResultType
SCell.CellType getFormulaResultType() -
getType
SCell.CellType getType()- Returns:
- the cell type
-
getValue
Object getValue()- Returns:
- cell value.
-
setValue
-
isNull
boolean isNull()Because you always get a not-null cell object, use this method to judge the cell is really null or not.- Returns:
- TRUE if this cell is really null which means it have not been created.
-
getRowIndex
int getRowIndex() -
getColumnIndex
int getColumnIndex() -
getReferenceString
String getReferenceString()- Returns:
- cell reference like A1
-
getHyperlink
SHyperlink getHyperlink() -
setHyperlink
Set or clear a hyperlink- Parameters:
hyperlink- hyperlink to set, or null to clear
-
setupHyperlink
setup a hyperlink -
clearValue
void clearValue()clear cell value , reset it to blank -
setStringValue
Set string value, if the value start with '=', then it sets as formula -
getStringValue
String getStringValue() -
setupRichTextValue
SRichText setupRichTextValue()Setup a rich text value(Create a new one if the old value is not a rich-text) and return the instance which to be edited. -
getRichTextValue
SRichText getRichTextValue()Return the rich text value. if this cell is a simple string value, it will return a read-only rich-text which wraps string-value and current font.- Returns:
-
isRichTextValue
boolean isRichTextValue()Check if this cell contains a rich-text value -
setFormulaValue
set formula with string without '=', e.g. SUM(A1:B2)- Parameters:
formula-
-
getFormulaValue
String getFormulaValue()- Returns:
- returns formula string without '=', e.g. SUM(A1:B2)
-
setNumberValue
-
getNumberValue
Double getNumberValue() -
setDateValue
Sets the number value a date instance, it will transfer the date to double value -
getDateValue
Date getDateValue()Gets the date value that is transfered by the double number value. -
setBooleanValue
-
getBooleanValue
Boolean getBooleanValue()Gets the boolean value -
getErrorValue
ErrorValue getErrorValue() -
setErrorValue
-
setComment
-
setupComment
SComment setupComment() -
getComment
SComment getComment() -
deleteComment
void deleteComment()Delete the comment associated with this cell.- Since:
- 3.7.0
-
getArrayFormulaRegion
CellRegion getArrayFormulaRegion()Only valid for array formula cells- Returns:
- the region of the array formula group that the cell belongs to.
- Since:
- 6.0.0
-
isPartOfArrayFormulaGroup
boolean isPartOfArrayFormulaGroup()- Returns:
trueif this cell is part of group of cells having a common array formula.- Since:
- 6.0.0
-