|
||||||||||
| 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 |
|---|
org.apache.poi.ss.usermodel.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 |
allCellsIterator()
|
java.util.Iterator |
cellIterator()
|
org.apache.poi.ss.usermodel.Cell |
createCell(int column)
Use this to create new cells within the row and return it. |
org.apache.poi.ss.usermodel.Cell |
createCell(int column,
int type)
Use this to create new cells within the row and return it. |
org.apache.poi.ss.usermodel.Cell |
getCell(int cellnum)
Get the cell representing a given column (logical cell) 0-based. |
org.apache.poi.ss.usermodel.Cell |
getCell(int cellnum,
org.apache.poi.ss.usermodel.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 |
org.apache.poi.ss.usermodel.CellStyle |
getRowStyle()
Returns the whole-row cell style. |
org.apache.poi.ss.usermodel.Sheet |
getSheet()
Returns the Sheet this row belongs to |
boolean |
getZeroHeight()
Get whether or not to display this row with 0 height |
boolean |
hasCustomHeight()
|
boolean |
isFormatted()
Is this row formatted? Most aren't, but some rows do have whole-row styles. |
java.util.Iterator |
iterator()
|
void |
removeCell(org.apache.poi.ss.usermodel.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 |
setRowStyle(org.apache.poi.ss.usermodel.CellStyle style)
Applies a whole-row cell styling to the row. |
void |
setZeroHeight(boolean zHeight)
Set whether or not to display this row with 0 height |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SXSSFRow(SXSSFSheet sheet,
int initialSize)
| Method Detail |
|---|
public java.util.Iterator allCellsIterator()
public boolean hasCustomHeight()
public java.util.Iterator iterator()
iterator in interface poi.support.Iterablepublic org.apache.poi.ss.usermodel.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 org.apache.poi.ss.usermodel.Rowcolumn - - 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 org.apache.poi.ss.usermodel.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 org.apache.poi.ss.usermodel.Rowcolumn - - 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(org.apache.poi.ss.usermodel.Cell cell)
removeCell in interface org.apache.poi.ss.usermodel.Rowcell - the cell to removepublic void setRowNum(int rowNum)
setRowNum in interface org.apache.poi.ss.usermodel.RowrowNum - the row number (0-based)
java.lang.IllegalArgumentException - if rowNum < 0public int getRowNum()
getRowNum in interface org.apache.poi.ss.usermodel.Rowpublic org.apache.poi.ss.usermodel.Cell getCell(int cellnum)
getCell in interface org.apache.poi.ss.usermodel.Rowcellnum - 0 based column number
getCell(int, org.apache.poi.ss.usermodel.Row.MissingCellPolicy)
public org.apache.poi.ss.usermodel.Cell getCell(int cellnum,
org.apache.poi.ss.usermodel.Row.MissingCellPolicy policy)
Row.MissingCellPolicy
getCell in interface org.apache.poi.ss.usermodel.Rowjava.lang.IllegalArgumentException - if cellnum < 0 or the specified MissingCellPolicy is invalidRow.RETURN_NULL_AND_BLANK,
Row.RETURN_BLANK_AS_NULL,
Row.CREATE_NULL_AS_BLANKpublic short getFirstCellNum()
getFirstCellNum in interface org.apache.poi.ss.usermodel.Rowpublic 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 org.apache.poi.ss.usermodel.Rowpublic int getPhysicalNumberOfCells()
getPhysicalNumberOfCells in interface org.apache.poi.ss.usermodel.Rowpublic void setHeight(short height)
setHeight in interface org.apache.poi.ss.usermodel.Rowheight - rowheight or 0xff for undefined (use sheet default)public void setZeroHeight(boolean zHeight)
setZeroHeight in interface org.apache.poi.ss.usermodel.RowzHeight - height is zero or not.public boolean getZeroHeight()
getZeroHeight in interface org.apache.poi.ss.usermodel.Rowpublic void setHeightInPoints(float height)
setHeightInPoints in interface org.apache.poi.ss.usermodel.Rowheight - the height in points. -1 resets to the default heightpublic short getHeight()
Sheet.getDefaultRowHeightInPoints()
getHeight in interface org.apache.poi.ss.usermodel.Rowpublic float getHeightInPoints()
Sheet.getDefaultRowHeightInPoints()
getHeightInPoints in interface org.apache.poi.ss.usermodel.RowSheet.getDefaultRowHeightInPoints()public boolean isFormatted()
getRowStyle()
isFormatted in interface org.apache.poi.ss.usermodel.Rowpublic org.apache.poi.ss.usermodel.CellStyle getRowStyle()
isFormatted() to check first.
getRowStyle in interface org.apache.poi.ss.usermodel.Rowpublic void setRowStyle(org.apache.poi.ss.usermodel.CellStyle style)
setRowStyle in interface org.apache.poi.ss.usermodel.Rowpublic java.util.Iterator cellIterator()
cellIterator in interface org.apache.poi.ss.usermodel.Rowpublic org.apache.poi.ss.usermodel.Sheet getSheet()
getSheet in interface org.apache.poi.ss.usermodel.Row
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||