Package io.keikai.model
Interface SCell
-
- All Superinterfaces:
CellStyleHolder,FormulaContent
- All Known Implementing Classes:
AbstractCellAdv,CellImpl
public interface SCell extends CellStyleHolder, FormulaContent
Represent a cell of a sheet in a Spreadsheet. A cell contains value and style (CellStyle), and its type is one ofSCell.CellType.- Since:
- 3.5.0
- Author:
- dennis
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSCell.CellType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearValue()clear cell value , reset it to blankvoiddeleteComment()Delete the comment associated with this cell.CellRegiongetArrayFormulaRegion()Only valid for array formula cellsBooleangetBooleanValue()Gets the boolean valueintgetColumnIndex()SCommentgetComment()DategetDateValue()Gets the date value that is transfered by the double number value.ErrorValuegetErrorValue()SCell.CellTypegetFormulaResultType()StringgetFormulaValue()SHyperlinkgetHyperlink()DoublegetNumberValue()StringgetReferenceString()SRichTextgetRichTextValue()Return the rich text value.intgetRowIndex()SSheetgetSheet()StringgetStringValue()SCell.CellTypegetType()ObjectgetValue()booleanisNull()Because you always get a not-null cell object, use this method to judge the cell is really null or not.booleanisPartOfArrayFormulaGroup()booleanisRichTextValue()Check 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 formulaSCommentsetupComment()SHyperlinksetupHyperlink(SHyperlink.HyperlinkType type, String address, String label)setup a hyperlinkSRichTextsetupRichTextValue()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.voidsetValue(Object value)-
Methods inherited from interface io.keikai.model.CellStyleHolder
getCellStyle, getCellStyle, setCellStyle
-
Methods inherited from interface io.keikai.model.FormulaContent
clearFormulaResultCache, isFormulaParsingError
-
-
-
-
Method Detail
-
getSheet
SSheet getSheet()
-
getFormulaResultType
SCell.CellType getFormulaResultType()
-
getType
SCell.CellType getType()
- Returns:
- the cell type
-
getValue
Object getValue()
- Returns:
- cell value.
-
setValue
void setValue(Object value)
-
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
void setHyperlink(SHyperlink hyperlink)
Set or clear a hyperlink- Parameters:
hyperlink- hyperlink to set, or null to clear
-
setupHyperlink
SHyperlink setupHyperlink(SHyperlink.HyperlinkType type, String address, String label)
setup a hyperlink
-
clearValue
void clearValue()
clear cell value , reset it to blank
-
setStringValue
void setStringValue(String value)
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
void setFormulaValue(String formula)
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
void setNumberValue(Double number)
-
getNumberValue
Double getNumberValue()
-
setDateValue
void setDateValue(Date date)
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
void setBooleanValue(Boolean bool)
-
getBooleanValue
Boolean getBooleanValue()
Gets the boolean value
-
getErrorValue
ErrorValue getErrorValue()
-
setErrorValue
void setErrorValue(ErrorValue errorValue)
-
setComment
void setComment(SComment comment)
-
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
-
-