Package com.github.pjfanning.xlsx.impl
Class StreamingCell
- java.lang.Object
-
- com.github.pjfanning.xlsx.impl.StreamingCell
-
- All Implemented Interfaces:
org.apache.poi.ss.usermodel.Cell
public class StreamingCell extends Object implements org.apache.poi.ss.usermodel.Cell
-
-
Constructor Summary
Constructors Constructor Description StreamingCell(org.apache.poi.ss.usermodel.Row row, int columnIndex, int rowIndex, boolean use1904Dates)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.poi.ss.util.CellAddressgetAddress()Not supportedorg.apache.poi.ss.util.CellRangeAddressgetArrayFormulaRange()Not supportedbooleangetBooleanCellValue()Get the value of the cell as a boolean.org.apache.poi.ss.usermodel.CellTypegetCachedFormulaResultType()Only valid for formula cellsorg.apache.poi.ss.usermodel.CellTypegetCachedFormulaResultTypeEnum()Deprecated.org.apache.poi.ss.usermodel.CommentgetCellComment()Not supportedStringgetCellFormula()Return a formula for the cell, for example,SUM(C4:E4)org.apache.poi.ss.usermodel.CellStylegetCellStyle()org.apache.poi.ss.usermodel.CellTypegetCellType()Return the cell type.org.apache.poi.ss.usermodel.CellTypegetCellTypeEnum()Deprecated.intgetColumnIndex()Returns column index of this cellDategetDateCellValue()Get the value of the cell as a date.bytegetErrorCellValue()Not supportedorg.apache.poi.ss.usermodel.HyperlinkgetHyperlink()Not supporteddoublegetNumericCellValue()Get the value of the cell as a number.StringgetNumericFormat()ShortgetNumericFormatIndex()org.apache.poi.xssf.usermodel.XSSFRichTextStringgetRichStringCellValue()Get the value of the cell as a XSSFRichTextStringorg.apache.poi.ss.usermodel.RowgetRow()Returns the Row this cell belongs to.intgetRowIndex()Returns row index of a row in the sheet that contains this cellorg.apache.poi.ss.usermodel.SheetgetSheet()StringgetStringCellValue()Get the value of the cell as a string.StringgetType()booleanisFormulaType()booleanisPartOfArrayFormulaGroup()Not supportedvoidremoveCellComment()Not supportedvoidremoveFormula()Not supportedvoidremoveHyperlink()Not supportedvoidsetAsActiveCell()Not supportedvoidsetBlank()Not supportedvoidsetCellComment(org.apache.poi.ss.usermodel.Comment comment)Not supportedvoidsetCellErrorValue(byte value)Not supportedvoidsetCellFormula(String formula)Not supportedvoidsetCellStyle(org.apache.poi.ss.usermodel.CellStyle cellStyle)voidsetCellType(org.apache.poi.ss.usermodel.CellType cellType)Not supportedvoidsetCellValue(boolean value)Not supportedvoidsetCellValue(double value)Not supportedvoidsetCellValue(String value)Not supportedvoidsetCellValue(Calendar value)Not supportedvoidsetCellValue(Date value)Not supportedvoidsetCellValue(org.apache.poi.ss.usermodel.RichTextString value)Not supportedvoidsetContentSupplier(com.github.pjfanning.xlsx.impl.Supplier contentsSupplier)voidsetFormula(String formula)voidsetFormulaType(boolean formulaType)voidsetHyperlink(org.apache.poi.ss.usermodel.Hyperlink link)Not supportedvoidsetNumericFormat(String numericFormat)voidsetNumericFormatIndex(Short numericFormatIndex)voidsetRawContents(Object rawContents)voidsetType(String type)
-
-
-
Method Detail
-
setContentSupplier
public void setContentSupplier(com.github.pjfanning.xlsx.impl.Supplier contentsSupplier)
-
setRawContents
public void setRawContents(Object rawContents)
-
getNumericFormat
public String getNumericFormat()
-
setNumericFormat
public void setNumericFormat(String numericFormat)
-
getNumericFormatIndex
public Short getNumericFormatIndex()
-
setNumericFormatIndex
public void setNumericFormatIndex(Short numericFormatIndex)
-
setFormula
public void setFormula(String formula)
-
getType
public String getType()
-
setType
public void setType(String type)
-
isFormulaType
public boolean isFormulaType()
-
setFormulaType
public void setFormulaType(boolean formulaType)
-
setCellStyle
public void setCellStyle(org.apache.poi.ss.usermodel.CellStyle cellStyle)
- Specified by:
setCellStylein interfaceorg.apache.poi.ss.usermodel.Cell
-
getColumnIndex
public int getColumnIndex()
Returns column index of this cell- Specified by:
getColumnIndexin interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- zero-based column index of a column in a sheet.
-
getRowIndex
public int getRowIndex()
Returns row index of a row in the sheet that contains this cell- Specified by:
getRowIndexin interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- zero-based row index of a row in the sheet that contains this cell
-
getRow
public org.apache.poi.ss.usermodel.Row getRow()
Returns the Row this cell belongs to. Note that keeping references to cell rows around after the iterator window has passed will preserve them.- Specified by:
getRowin interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- the Row that owns this cell
-
getSheet
public org.apache.poi.ss.usermodel.Sheet getSheet()
- Specified by:
getSheetin interfaceorg.apache.poi.ss.usermodel.Cell
-
getCellType
public org.apache.poi.ss.usermodel.CellType getCellType()
Return the cell type.- Specified by:
getCellTypein interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- the cell type
-
getCellTypeEnum
@Deprecated public org.apache.poi.ss.usermodel.CellType getCellTypeEnum()
Deprecated.Return the cell type.- Specified by:
getCellTypeEnumin interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- the cell type
Will be renamed to
getCellType()when we make the CellType enum transition in POI 4.0. See bug 59791.
-
getStringCellValue
public String getStringCellValue()
Get the value of the cell as a string. For blank cells we return an empty string.- Specified by:
getStringCellValuein interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- the value of the cell as a string
-
getNumericCellValue
public double getNumericCellValue()
Get the value of the cell as a number. For strings we throw an exception. For blank cells we return a 0.- Specified by:
getNumericCellValuein interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- the value of the cell as a number
- Throws:
NumberFormatException- if the cell value isn't a parsabledouble.
-
getDateCellValue
public Date getDateCellValue()
Get the value of the cell as a date. For strings we throw an exception. For blank cells we return a null.- Specified by:
getDateCellValuein interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- the value of the cell as a date
- Throws:
IllegalStateException- if the cell type returned bygetCellType()is CELL_TYPE_STRINGNumberFormatException- if the cell value isn't a parsabledouble.
-
getBooleanCellValue
public boolean getBooleanCellValue()
Get the value of the cell as a boolean. For strings we throw an exception. For blank cells we return a false.- Specified by:
getBooleanCellValuein interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- the value of the cell as a date
-
getCellStyle
public org.apache.poi.ss.usermodel.CellStyle getCellStyle()
- Specified by:
getCellStylein interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- the style of the cell
-
getCellFormula
public String getCellFormula()
Return a formula for the cell, for example,SUM(C4:E4)- Specified by:
getCellFormulain interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- a formula for the cell
- Throws:
IllegalStateException- if the cell type returned bygetCellType()is not CELL_TYPE_FORMULA
-
getRichStringCellValue
public org.apache.poi.xssf.usermodel.XSSFRichTextString getRichStringCellValue()
Get the value of the cell as a XSSFRichTextStringFor numeric cells we throw an exception. For blank cells we return an empty string. For formula cells we return the pre-calculated value if a string, otherwise an exception
- Specified by:
getRichStringCellValuein interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- the value of the cell as a XSSFRichTextString
-
getCachedFormulaResultType
public org.apache.poi.ss.usermodel.CellType getCachedFormulaResultType()
Only valid for formula cells- Specified by:
getCachedFormulaResultTypein interfaceorg.apache.poi.ss.usermodel.Cell- Returns:
- one of (
CellType.NUMERIC,CellType.STRING,CellType.BOOLEAN,CellType.ERROR) depending on the cached value of the formula
-
getCachedFormulaResultTypeEnum
@Deprecated public org.apache.poi.ss.usermodel.CellType getCachedFormulaResultTypeEnum()
Deprecated.- Specified by:
getCachedFormulaResultTypeEnumin interfaceorg.apache.poi.ss.usermodel.Cell
-
setCellType
public void setCellType(org.apache.poi.ss.usermodel.CellType cellType)
Not supported- Specified by:
setCellTypein interfaceorg.apache.poi.ss.usermodel.Cell
-
setBlank
public void setBlank()
Not supported- Specified by:
setBlankin interfaceorg.apache.poi.ss.usermodel.Cell
-
setCellValue
public void setCellValue(double value)
Not supported- Specified by:
setCellValuein interfaceorg.apache.poi.ss.usermodel.Cell
-
setCellValue
public void setCellValue(Date value)
Not supported- Specified by:
setCellValuein interfaceorg.apache.poi.ss.usermodel.Cell
-
setCellValue
public void setCellValue(Calendar value)
Not supported- Specified by:
setCellValuein interfaceorg.apache.poi.ss.usermodel.Cell
-
setCellValue
public void setCellValue(org.apache.poi.ss.usermodel.RichTextString value)
Not supported- Specified by:
setCellValuein interfaceorg.apache.poi.ss.usermodel.Cell
-
setCellValue
public void setCellValue(String value)
Not supported- Specified by:
setCellValuein interfaceorg.apache.poi.ss.usermodel.Cell
-
setCellFormula
public void setCellFormula(String formula) throws org.apache.poi.ss.formula.FormulaParseException
Not supported- Specified by:
setCellFormulain interfaceorg.apache.poi.ss.usermodel.Cell- Throws:
org.apache.poi.ss.formula.FormulaParseException
-
removeFormula
public void removeFormula() throws IllegalStateExceptionNot supported- Specified by:
removeFormulain interfaceorg.apache.poi.ss.usermodel.Cell- Throws:
IllegalStateException
-
setCellValue
public void setCellValue(boolean value)
Not supported- Specified by:
setCellValuein interfaceorg.apache.poi.ss.usermodel.Cell
-
setCellErrorValue
public void setCellErrorValue(byte value)
Not supported- Specified by:
setCellErrorValuein interfaceorg.apache.poi.ss.usermodel.Cell
-
getErrorCellValue
public byte getErrorCellValue()
Not supported- Specified by:
getErrorCellValuein interfaceorg.apache.poi.ss.usermodel.Cell
-
setAsActiveCell
public void setAsActiveCell()
Not supported- Specified by:
setAsActiveCellin interfaceorg.apache.poi.ss.usermodel.Cell
-
getAddress
public org.apache.poi.ss.util.CellAddress getAddress()
Not supported- Specified by:
getAddressin interfaceorg.apache.poi.ss.usermodel.Cell
-
setCellComment
public void setCellComment(org.apache.poi.ss.usermodel.Comment comment)
Not supported- Specified by:
setCellCommentin interfaceorg.apache.poi.ss.usermodel.Cell
-
getCellComment
public org.apache.poi.ss.usermodel.Comment getCellComment()
Not supported- Specified by:
getCellCommentin interfaceorg.apache.poi.ss.usermodel.Cell
-
removeCellComment
public void removeCellComment()
Not supported- Specified by:
removeCellCommentin interfaceorg.apache.poi.ss.usermodel.Cell
-
getHyperlink
public org.apache.poi.ss.usermodel.Hyperlink getHyperlink()
Not supported- Specified by:
getHyperlinkin interfaceorg.apache.poi.ss.usermodel.Cell
-
setHyperlink
public void setHyperlink(org.apache.poi.ss.usermodel.Hyperlink link)
Not supported- Specified by:
setHyperlinkin interfaceorg.apache.poi.ss.usermodel.Cell
-
removeHyperlink
public void removeHyperlink()
Not supported- Specified by:
removeHyperlinkin interfaceorg.apache.poi.ss.usermodel.Cell
-
getArrayFormulaRange
public org.apache.poi.ss.util.CellRangeAddress getArrayFormulaRange()
Not supported- Specified by:
getArrayFormulaRangein interfaceorg.apache.poi.ss.usermodel.Cell
-
isPartOfArrayFormulaGroup
public boolean isPartOfArrayFormulaGroup()
Not supported- Specified by:
isPartOfArrayFormulaGroupin interfaceorg.apache.poi.ss.usermodel.Cell
-
-