- java.lang.Object
-
- org.dhatim.fastexcel.reader.Cell
-
public class Cell extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanasBoolean()LocalDateTimeasDate()Returns a date-time interpretation of a numerical cell.BigDecimalasNumber()StringasString()CellAddressgetAddress()intgetColumnIndex()IntegergetDataFormatId()StringgetDataFormatString()StringgetFormula()StringgetRawValue()StringgetText()CellTypegetType()ObjectgetValue()StringtoString()Returns a string representation of this component for debug purposes.
-
-
-
Method Detail
-
getType
public CellType getType()
-
getColumnIndex
public int getColumnIndex()
-
getAddress
public CellAddress getAddress()
-
getValue
public Object getValue()
-
getRawValue
public String getRawValue()
- Returns:
- xml value of the cell as it appears in the sheet format.
-
getFormula
public String getFormula()
-
asNumber
public BigDecimal asNumber()
-
asDate
public LocalDateTime asDate()
Returns a date-time interpretation of a numerical cell.- Returns:
- LocalDateTime or null if the cell is empty
- Throws:
ExcelReaderException- is the cell if not of numerical type or empty
-
asBoolean
public Boolean asBoolean()
-
asString
public String asString()
- Returns:
- value of a string cell.
- Throws:
ExcelReaderException- when the cell is not of string type- See Also:
getText()
-
getText
public String getText()
- Returns:
- string representation of the cell's value
- See Also:
asString()
-
getDataFormatId
public Integer getDataFormatId()
-
getDataFormatString
public String getDataFormatString()
-
-