|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.xssf.streaming.SXSSFRow
public class SXSSFRow
Streaming version of XSSFRow implementing the "BigGridDemo" strategy.
Nested Class Summary | |
---|---|
class |
SXSSFRow.CellIterator
returns all cells including empty cells in which case "null" is returned |
class |
SXSSFRow.FilledCellIterator
returns all filled cells (created via Row.createCell()) |
Nested classes/interfaces inherited from interface org.apache.poi.ss.usermodel.Row |
---|
Row.MissingCellPolicy |
Field Summary |
---|
Fields inherited from interface org.apache.poi.ss.usermodel.Row |
---|
CREATE_NULL_AS_BLANK, RETURN_BLANK_AS_NULL, RETURN_NULL_AND_BLANK |
Constructor Summary | |
---|---|
SXSSFRow(SXSSFSheet sheet,
int initialSize)
|
Method Summary | |
---|---|
java.util.Iterator<Cell> |
allCellsIterator()
|
java.util.Iterator<Cell> |
cellIterator()
|
Cell |
createCell(int column)
Use this to create new cells within the row and return it. |
Cell |
createCell(int column,
int type)
Use this to create new cells within the row and return it. |
Cell |
getCell(int cellnum)
Get the cell representing a given column (logical cell) 0-based. |
Cell |
getCell(int cellnum,
Row.MissingCellPolicy policy)
Returns the cell at the given (0 based) index, with the specified Row.MissingCellPolicy |
short |
getFirstCellNum()
Get the number of the first cell contained in this row. |
short |
getHeight()
Get the row's height measured in twips (1/20th of a point). |
float |
getHeightInPoints()
Returns row height measured in point size. |
short |
getLastCellNum()
Gets the index of the last cell contained in this row PLUS ONE. |
int |
getPhysicalNumberOfCells()
Gets the number of defined cells (NOT number of cells in the actual row!). |
int |
getRowNum()
Get row number this row represents |
Sheet |
getSheet()
Returns the Sheet this row belongs to |
boolean |
getZeroHeight()
Get whether or not to display this row with 0 height |
boolean |
hasCustomHeight()
|
java.util.Iterator<Cell> |
iterator()
|
void |
removeCell(Cell cell)
Remove the Cell from this row. |
void |
setHeight(short height)
Set the row's height or set to ff (-1) for undefined/default-height. |
void |
setHeightInPoints(float height)
Set the row's height in points. |
void |
setRowNum(int rowNum)
Set the row number of this row. |
void |
setZeroHeight(boolean zHeight)
Set whether or not to display this row with 0 height |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SXSSFRow(SXSSFSheet sheet, int initialSize)
Method Detail |
---|
public java.util.Iterator<Cell> allCellsIterator()
public boolean hasCustomHeight()
public java.util.Iterator<Cell> iterator()
iterator
in interface java.lang.Iterable<Cell>
public Cell createCell(int column)
The cell that is returned is a Cell.CELL_TYPE_BLANK
. The type can be changed
either through calling setCellValue
or setCellType
.
createCell
in interface Row
column
- - the column number this cell represents
java.lang.IllegalArgumentException
- if columnIndex < 0 or greater than the maximum number of supported columns
(255 for *.xls, 1048576 for *.xlsx)public Cell createCell(int column, int type)
The cell that is returned is a Cell.CELL_TYPE_BLANK
. The type can be changed
either through calling setCellValue or setCellType.
createCell
in interface Row
column
- - the column number this cell represents
java.lang.IllegalArgumentException
- if columnIndex < 0 or greate than a maximum number of supported columns
(255 for *.xls, 1048576 for *.xlsx)public void removeCell(Cell cell)
removeCell
in interface Row
cell
- the cell to removepublic void setRowNum(int rowNum)
setRowNum
in interface Row
rowNum
- the row number (0-based)
java.lang.IllegalArgumentException
- if rowNum < 0public int getRowNum()
getRowNum
in interface Row
public Cell getCell(int cellnum)
getCell
in interface Row
cellnum
- 0 based column number
getCell(int, org.apache.poi.ss.usermodel.Row.MissingCellPolicy)
public Cell getCell(int cellnum, Row.MissingCellPolicy policy)
Row.MissingCellPolicy
getCell
in interface Row
java.lang.IllegalArgumentException
- if cellnum < 0 or the specified MissingCellPolicy is invalidRow.RETURN_NULL_AND_BLANK
,
Row.RETURN_BLANK_AS_NULL
,
Row.CREATE_NULL_AS_BLANK
public short getFirstCellNum()
getFirstCellNum
in interface Row
public short getLastCellNum()
short minColIx = row.getFirstCellNum(); short maxColIx = row.getLastCellNum(); for(short colIx=minColIx; colIx<maxColIx; colIx++) { Cell cell = row.getCell(colIx); if(cell == null) { continue; } //... do something with cell }
getLastCellNum
in interface Row
public int getPhysicalNumberOfCells()
getPhysicalNumberOfCells
in interface Row
public void setHeight(short height)
setHeight
in interface Row
height
- rowheight or 0xff for undefined (use sheet default)public void setZeroHeight(boolean zHeight)
setZeroHeight
in interface Row
zHeight
- height is zero or not.public boolean getZeroHeight()
getZeroHeight
in interface Row
public void setHeightInPoints(float height)
setHeightInPoints
in interface Row
height
- the height in points. -1
resets to the default heightpublic short getHeight()
Sheet.getDefaultRowHeightInPoints()
getHeight
in interface Row
public float getHeightInPoints()
Sheet.getDefaultRowHeightInPoints()
getHeightInPoints
in interface Row
Sheet.getDefaultRowHeightInPoints()
public java.util.Iterator<Cell> cellIterator()
cellIterator
in interface Row
public Sheet getSheet()
getSheet
in interface Row
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |