|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.xssf.streaming.SXSSFSheet
public class SXSSFSheet
Streaming version of XSSFSheet implementing the "BigGridDemo" strategy.
| Field Summary |
|---|
| Fields inherited from interface org.apache.poi.ss.usermodel.Sheet |
|---|
BottomMargin, FooterMargin, HeaderMargin, LeftMargin, PANE_LOWER_LEFT, PANE_LOWER_RIGHT, PANE_UPPER_LEFT, PANE_UPPER_RIGHT, RightMargin, TopMargin |
| Constructor Summary | |
|---|---|
SXSSFSheet(SXSSFWorkbook workbook,
XSSFSheet xSheet)
|
|
| Method Summary | |
|---|---|
int |
addMergedRegion(org.apache.poi.ss.util.CellRangeAddress region)
Adds a merged region of cells (hence those cells form one) |
void |
addValidationData(org.apache.poi.ss.usermodel.DataValidation dataValidation)
Creates a data validation object |
void |
autoSizeColumn(int column)
Adjusts the column width to fit the contents. |
void |
autoSizeColumn(int column,
boolean useMergedCells)
Adjusts the column width to fit the contents. |
void |
changeRowNum(SXSSFRow row,
int newRowNum)
|
org.apache.poi.ss.usermodel.Drawing |
createDrawingPatriarch()
Creates the top-level drawing patriarch. |
void |
createFreezePane(int colSplit,
int rowSplit)
Creates a split (freezepane). |
void |
createFreezePane(int colSplit,
int rowSplit,
int leftmostColumn,
int topRow)
Creates a split (freezepane). |
org.apache.poi.ss.usermodel.Row |
createRow(int rownum)
Create a new row within the sheet and return the high level representation |
void |
createSplitPane(int xSplitPos,
int ySplitPos,
int leftmostColumn,
int topRow,
int activePane)
Creates a split pane. |
void |
flushRows()
Flush all rows to disk. |
void |
flushRows(int remaining)
Specifies how many rows can be accessed at most via getRow(). |
boolean |
getAutobreaks()
Flag indicating whether the sheet displays Automatic Page Breaks. |
org.apache.poi.ss.usermodel.Comment |
getCellComment(int row,
int column)
Returns cell comment for the specified row and column |
int[] |
getColumnBreaks()
Retrieves all the vertical page breaks |
org.apache.poi.ss.usermodel.CellStyle |
getColumnStyle(int column)
Returns the CellStyle that applies to the given (0 based) column, or null if no style has been set for that column |
int |
getColumnWidth(int columnIndex)
get the width (in units of 1/256th of a character width ) |
org.apache.poi.ss.usermodel.DataValidationHelper |
getDataValidationHelper()
|
int |
getDefaultColumnWidth()
Get the default column width for the sheet (if the columns do not define their own width) in characters |
short |
getDefaultRowHeight()
Get the default row height for the sheet (if the rows do not define their own height) in twips (1/20 of a point) |
float |
getDefaultRowHeightInPoints()
Get the default row height for the sheet (if the rows do not define their own height) in points. |
boolean |
getDisplayGuts()
Get whether to display the guts or not, default value is true |
int |
getFirstRowNum()
Gets the first row on the sheet |
boolean |
getFitToPage()
Flag indicating whether the Fit to Page print option is enabled. |
org.apache.poi.ss.usermodel.Footer |
getFooter()
Gets the user model for the default document footer. |
boolean |
getForceFormulaRecalculation()
Whether Excel will be asked to recalculate all formulas when the workbook is opened. |
org.apache.poi.ss.usermodel.Header |
getHeader()
Gets the user model for the default document header. |
boolean |
getHorizontallyCenter()
Determine whether printed output for this sheet will be horizontally centered. |
int |
getLastRowNum()
Gets the last row on the sheet |
short |
getLeftCol()
The left col in the visible view when the sheet is first viewed after opening it in a viewer |
double |
getMargin(short margin)
Gets the size of the margin in inches. |
org.apache.poi.ss.util.CellRangeAddress |
getMergedRegion(int index)
Returns the merged region at the specified index |
int |
getNumMergedRegions()
Returns the number of merged regions |
org.apache.poi.hssf.util.PaneInformation |
getPaneInformation()
Returns the information regarding the currently configured pane (split or freeze) |
int |
getPhysicalNumberOfRows()
Returns the number of physically defined rows (NOT the number of rows in the sheet) |
org.apache.poi.ss.usermodel.PrintSetup |
getPrintSetup()
Gets the print setup object. |
boolean |
getProtect()
Answer whether protection is enabled or disabled |
org.apache.poi.ss.usermodel.Row |
getRow(int rownum)
Returns the logical row (not physical) 0-based. |
int[] |
getRowBreaks()
Retrieves all the horizontal page breaks |
int |
getRowNum(SXSSFRow row)
|
boolean |
getRowSumsBelow()
Flag indicating whether summary rows appear below detail in an outline, when applying an outline. |
boolean |
getRowSumsRight()
Flag indicating whether summary columns appear to the right of detail in an outline, when applying an outline. |
boolean |
getScenarioProtect()
Answer whether scenario protection is enabled or disabled |
org.apache.poi.ss.usermodel.SheetConditionalFormatting |
getSheetConditionalFormatting()
|
java.lang.String |
getSheetName()
Returns the name of this sheet |
short |
getTopRow()
The top row in the visible view when the sheet is first viewed after opening it in a viewer |
boolean |
getVerticallyCenter()
Determine whether printed output for this sheet will be vertically centered. |
org.apache.poi.ss.usermodel.Workbook |
getWorkbook()
Return the parent workbook |
java.io.InputStream |
getWorksheetXMLInputStream()
|
void |
groupColumn(int fromColumn,
int toColumn)
Create an outline for the provided column range. |
void |
groupRow(int fromRow,
int toRow)
Tie a range of rows together so that they can be collapsed or expanded |
boolean |
isColumnBroken(int column)
Determines if there is a page break at the indicated column |
boolean |
isColumnHidden(int columnIndex)
Get the hidden state for a given column |
boolean |
isDisplayFormulas()
Returns if formulas are displayed |
boolean |
isDisplayGridlines()
Returns if gridlines are displayed |
boolean |
isDisplayRowColHeadings()
Returns if RowColHeadings are displayed. |
boolean |
isDisplayZeros()
Gets the flag indicating whether the window should show 0 (zero) in cells containing zero value. |
boolean |
isPrintGridlines()
Gets the flag indicating whether this sheet displays the lines between rows and columns to make editing and reading easier. |
boolean |
isRightToLeft()
Whether the text is displayed in right-to-left mode in the window |
boolean |
isRowBroken(int row)
Determines if there is a page break at the indicated row |
boolean |
isSelected()
Note - this is not the same as whether the sheet is focused (isActive) |
java.util.Iterator |
iterator()
|
void |
protectSheet(java.lang.String password)
Sets the protection enabled as well as the password |
org.apache.poi.ss.usermodel.CellRange |
removeArrayFormula(org.apache.poi.ss.usermodel.Cell cell)
Remove a Array Formula from this sheet. |
void |
removeColumnBreak(int column)
Removes a page break at the indicated column |
void |
removeMergedRegion(int index)
Removes a merged region of cells (hence letting them free) |
void |
removeRow(org.apache.poi.ss.usermodel.Row row)
Remove a row from this sheet. |
void |
removeRowBreak(int row)
Removes the page break at the indicated row |
java.util.Iterator |
rowIterator()
Returns an iterator of the physical rows |
org.apache.poi.ss.usermodel.CellRange |
setArrayFormula(java.lang.String formula,
org.apache.poi.ss.util.CellRangeAddress range)
Sets array formula to specified region for result. |
void |
setAutobreaks(boolean value)
Flag indicating whether the sheet displays Automatic Page Breaks. |
org.apache.poi.ss.usermodel.AutoFilter |
setAutoFilter(org.apache.poi.ss.util.CellRangeAddress range)
Enable filtering for a range of cells |
void |
setColumnBreak(int column)
Sets a page break at the indicated column |
void |
setColumnGroupCollapsed(int columnNumber,
boolean collapsed)
Expands or collapses a column group. |
void |
setColumnHidden(int columnIndex,
boolean hidden)
Get the visibility state for a given column |
void |
setColumnWidth(int columnIndex,
int width)
Set the width (in units of 1/256th of a character width) |
void |
setDefaultColumnStyle(int column,
org.apache.poi.ss.usermodel.CellStyle style)
Sets the default column style for a given column. |
void |
setDefaultColumnWidth(int width)
Set the default column width for the sheet (if the columns do not define their own width) in characters |
void |
setDefaultRowHeight(short height)
Set the default row height for the sheet (if the rows do not define their own height) in twips (1/20 of a point) |
void |
setDefaultRowHeightInPoints(float height)
Set the default row height for the sheet (if the rows do not define their own height) in points |
void |
setDisplayFormulas(boolean show)
Sets whether the formulas are shown in a viewer |
void |
setDisplayGridlines(boolean show)
Sets whether the gridlines are shown in a viewer |
void |
setDisplayGuts(boolean value)
Set whether to display the guts or not |
void |
setDisplayRowColHeadings(boolean show)
Sets whether the RowColHeadings are shown in a viewer |
void |
setDisplayZeros(boolean value)
Set whether the window should show 0 (zero) in cells containing zero value. |
void |
setFitToPage(boolean value)
Flag indicating whether the Fit to Page print option is enabled. |
void |
setForceFormulaRecalculation(boolean value)
Control if Excel should be asked to recalculate all formulas when the workbook is opened, via the "sheetCalcPr fullCalcOnLoad" option. |
void |
setHorizontallyCenter(boolean value)
Determines whether the output is horizontally centered on the page. |
void |
setMargin(short margin,
double size)
Sets the size of the margin in inches. |
void |
setPrintGridlines(boolean show)
Sets the flag indicating whether this sheet should display the lines between rows and columns to make editing and reading easier. |
void |
setRandomAccessWindowSize(int value)
Specifies how many rows can be accessed at most via getRow(). |
void |
setRightToLeft(boolean value)
Sets whether the worksheet is displayed from right to left instead of from left to right. |
void |
setRowBreak(int row)
Sets a page break at the indicated row |
void |
setRowGroupCollapsed(int row,
boolean collapse)
Set view state of a groupped range of rows |
void |
setRowSumsBelow(boolean value)
Flag indicating whether summary rows appear below detail in an outline, when applying an outline. |
void |
setRowSumsRight(boolean value)
Flag indicating whether summary columns appear to the right of detail in an outline, when applying an outline. |
void |
setSelected(boolean value)
Sets a flag indicating whether this sheet is selected. |
void |
setVerticallyCenter(boolean value)
Determines whether the output is vertically centered on the page. |
void |
setZoom(int numerator,
int denominator)
Sets the zoom magnication for the sheet. |
void |
shiftRows(int startRow,
int endRow,
int n)
Shifts rows between startRow and endRow n number of rows. |
void |
shiftRows(int startRow,
int endRow,
int n,
boolean copyRowHeight,
boolean resetOriginalRowHeight)
Shifts rows between startRow and endRow n number of rows. |
void |
showInPane(short toprow,
short leftcol)
Sets desktop window pane display area, when the file is first opened in a viewer. |
void |
ungroupColumn(int fromColumn,
int toColumn)
Ungroup a range of columns that were previously groupped |
void |
ungroupRow(int fromRow,
int toRow)
Ungroup a range of rows that were previously groupped |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SXSSFSheet(SXSSFWorkbook workbook,
XSSFSheet xSheet)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public java.io.InputStream getWorksheetXMLInputStream()
throws java.io.IOException
java.io.IOExceptionpublic java.util.Iterator iterator()
iterator in interface poi.support.Iterablepublic org.apache.poi.ss.usermodel.Row createRow(int rownum)
createRow in interface org.apache.poi.ss.usermodel.Sheetrownum - row number
removeRow(Row)public void removeRow(org.apache.poi.ss.usermodel.Row row)
removeRow in interface org.apache.poi.ss.usermodel.Sheetrow - representing a row to remove.public org.apache.poi.ss.usermodel.Row getRow(int rownum)
getRow in interface org.apache.poi.ss.usermodel.Sheetrownum - row to get (0-based)
public int getPhysicalNumberOfRows()
getPhysicalNumberOfRows in interface org.apache.poi.ss.usermodel.Sheetpublic int getFirstRowNum()
getFirstRowNum in interface org.apache.poi.ss.usermodel.Sheetpublic int getLastRowNum()
getLastRowNum in interface org.apache.poi.ss.usermodel.Sheet
public void setColumnHidden(int columnIndex,
boolean hidden)
setColumnHidden in interface org.apache.poi.ss.usermodel.SheetcolumnIndex - - the column to get (0-based)hidden - - the visiblity state of the columnpublic boolean isColumnHidden(int columnIndex)
isColumnHidden in interface org.apache.poi.ss.usermodel.SheetcolumnIndex - - the column to set (0-based)
false if the column is visible
public void setColumnWidth(int columnIndex,
int width)
The maximum column width for an individual cell is 255 characters. This value represents the number of characters that can be displayed in a cell that is formatted with the standard font.
setColumnWidth in interface org.apache.poi.ss.usermodel.SheetcolumnIndex - - the column to set (0-based)width - - the width in units of 1/256th of a character widthpublic int getColumnWidth(int columnIndex)
getColumnWidth in interface org.apache.poi.ss.usermodel.SheetcolumnIndex - - the column to set (0-based)
public void setDefaultColumnWidth(int width)
setDefaultColumnWidth in interface org.apache.poi.ss.usermodel.Sheetwidth - default column width measured in characterspublic int getDefaultColumnWidth()
getDefaultColumnWidth in interface org.apache.poi.ss.usermodel.Sheetpublic short getDefaultRowHeight()
getDefaultRowHeight in interface org.apache.poi.ss.usermodel.Sheetpublic float getDefaultRowHeightInPoints()
getDefaultRowHeightInPoints in interface org.apache.poi.ss.usermodel.Sheetpublic void setDefaultRowHeight(short height)
setDefaultRowHeight in interface org.apache.poi.ss.usermodel.Sheetheight - default row height measured in twips (1/20 of a point)public void setDefaultRowHeightInPoints(float height)
setDefaultRowHeightInPoints in interface org.apache.poi.ss.usermodel.Sheetheight - default row heightpublic org.apache.poi.ss.usermodel.CellStyle getColumnStyle(int column)
getColumnStyle in interface org.apache.poi.ss.usermodel.Sheetpublic int addMergedRegion(org.apache.poi.ss.util.CellRangeAddress region)
addMergedRegion in interface org.apache.poi.ss.usermodel.Sheetregion - (rowfrom/colfrom-rowto/colto) to merge
public void setVerticallyCenter(boolean value)
setVerticallyCenter in interface org.apache.poi.ss.usermodel.Sheetvalue - true to vertically center, false otherwise.public void setHorizontallyCenter(boolean value)
setHorizontallyCenter in interface org.apache.poi.ss.usermodel.Sheetvalue - true to horizontally center, false otherwise.public boolean getHorizontallyCenter()
getHorizontallyCenter in interface org.apache.poi.ss.usermodel.Sheetpublic boolean getVerticallyCenter()
getVerticallyCenter in interface org.apache.poi.ss.usermodel.Sheetpublic void removeMergedRegion(int index)
removeMergedRegion in interface org.apache.poi.ss.usermodel.Sheetindex - of the region to unmergepublic int getNumMergedRegions()
getNumMergedRegions in interface org.apache.poi.ss.usermodel.Sheetpublic org.apache.poi.ss.util.CellRangeAddress getMergedRegion(int index)
getMergedRegion in interface org.apache.poi.ss.usermodel.Sheetpublic java.util.Iterator rowIterator()
rowIterator in interface org.apache.poi.ss.usermodel.Sheetpublic void setAutobreaks(boolean value)
setAutobreaks in interface org.apache.poi.ss.usermodel.Sheetvalue - true if the sheet displays Automatic Page Breaks.public void setDisplayGuts(boolean value)
setDisplayGuts in interface org.apache.poi.ss.usermodel.Sheetvalue - - guts or no gutspublic void setDisplayZeros(boolean value)
setDisplayZeros in interface org.apache.poi.ss.usermodel.Sheetvalue - whether to display or hide all zero values on the worksheetpublic boolean isDisplayZeros()
isDisplayZeros in interface org.apache.poi.ss.usermodel.Sheetpublic void setRightToLeft(boolean value)
setRightToLeft in interface org.apache.poi.ss.usermodel.Sheetvalue - true for right to left, false otherwise.public boolean isRightToLeft()
isRightToLeft in interface org.apache.poi.ss.usermodel.Sheetpublic void setFitToPage(boolean value)
setFitToPage in interface org.apache.poi.ss.usermodel.Sheetvalue - true if the Fit to Page print option is enabled.public void setRowSumsBelow(boolean value)
When true a summary row is inserted below the detailed data being summarized and a new outline level is established on that row.
When false a summary row is inserted above the detailed data being summarized and a new outline level is established on that row.
setRowSumsBelow in interface org.apache.poi.ss.usermodel.Sheetvalue - true if row summaries appear below detail in the outlinepublic void setRowSumsRight(boolean value)
When true a summary column is inserted to the right of the detailed data being summarized and a new outline level is established on that column.
When false a summary column is inserted to the left of the detailed data being summarized and a new outline level is established on that column.
setRowSumsRight in interface org.apache.poi.ss.usermodel.Sheetvalue - true if col summaries appear right of the detail in the outlinepublic boolean getAutobreaks()
getAutobreaks in interface org.apache.poi.ss.usermodel.Sheettrue if the sheet displays Automatic Page Breaks.public boolean getDisplayGuts()
getDisplayGuts in interface org.apache.poi.ss.usermodel.Sheetpublic boolean getFitToPage()
getFitToPage in interface org.apache.poi.ss.usermodel.Sheettrue if the Fit to Page print option is enabled.public boolean getRowSumsBelow()
When true a summary row is inserted below the detailed data being summarized and a new outline level is established on that row.
When false a summary row is inserted above the detailed data being summarized and a new outline level is established on that row.
getRowSumsBelow in interface org.apache.poi.ss.usermodel.Sheettrue if row summaries appear below detail in the outlinepublic boolean getRowSumsRight()
When true a summary column is inserted to the right of the detailed data being summarized and a new outline level is established on that column.
When false a summary column is inserted to the left of the detailed data being summarized and a new outline level is established on that column.
getRowSumsRight in interface org.apache.poi.ss.usermodel.Sheettrue if col summaries appear right of the detail in the outlinepublic boolean isPrintGridlines()
isPrintGridlines in interface org.apache.poi.ss.usermodel.Sheettrue if this sheet displays gridlines.to check if printing of gridlines is turned on or offpublic void setPrintGridlines(boolean show)
setPrintGridlines(boolean)
setPrintGridlines in interface org.apache.poi.ss.usermodel.Sheetshow - true if this sheet should display gridlines.setPrintGridlines(boolean)public org.apache.poi.ss.usermodel.PrintSetup getPrintSetup()
getPrintSetup in interface org.apache.poi.ss.usermodel.Sheetpublic org.apache.poi.ss.usermodel.Header getHeader()
getHeader in interface org.apache.poi.ss.usermodel.Sheetnullpublic org.apache.poi.ss.usermodel.Footer getFooter()
getFooter in interface org.apache.poi.ss.usermodel.Sheetnullpublic void setSelected(boolean value)
Note: multiple sheets can be selected, but only one sheet can be active at one time.
setSelected in interface org.apache.poi.ss.usermodel.Sheetvalue - true if this sheet is selectedWorkbook.setActiveSheet(int)public double getMargin(short margin)
getMargin in interface org.apache.poi.ss.usermodel.Sheetmargin - which margin to get
public void setMargin(short margin,
double size)
setMargin in interface org.apache.poi.ss.usermodel.Sheetmargin - which margin to getsize - the size of the marginpublic boolean getProtect()
getProtect in interface org.apache.poi.ss.usermodel.Sheetpublic void protectSheet(java.lang.String password)
protectSheet in interface org.apache.poi.ss.usermodel.Sheetpassword - to set for protection. Pass null to remove protectionpublic boolean getScenarioProtect()
getScenarioProtect in interface org.apache.poi.ss.usermodel.Sheet
public void setZoom(int numerator,
int denominator)
setZoom in interface org.apache.poi.ss.usermodel.Sheetnumerator - The numerator for the zoom magnification.denominator - The denominator for the zoom magnification.public short getTopRow()
getTopRow in interface org.apache.poi.ss.usermodel.Sheetpublic short getLeftCol()
getLeftCol in interface org.apache.poi.ss.usermodel.Sheet
public void showInPane(short toprow,
short leftcol)
showInPane in interface org.apache.poi.ss.usermodel.Sheettoprow - the top row to show in desktop window paneleftcol - the left column to show in desktop window panepublic void setForceFormulaRecalculation(boolean value)
FormulaEvaluator is the
recommended solution, but this may be used for certain cases where
evaluation in POI is not possible.
setForceFormulaRecalculation in interface org.apache.poi.ss.usermodel.Sheetpublic boolean getForceFormulaRecalculation()
getForceFormulaRecalculation in interface org.apache.poi.ss.usermodel.Sheet
public void shiftRows(int startRow,
int endRow,
int n)
Additionally shifts merged regions that are completely defined in these rows (ie. merged 2 cells on a row to be shifted).
shiftRows in interface org.apache.poi.ss.usermodel.SheetstartRow - the row to start shiftingendRow - the row to end shiftingn - the number of rows to shift
public void shiftRows(int startRow,
int endRow,
int n,
boolean copyRowHeight,
boolean resetOriginalRowHeight)
Additionally shifts merged regions that are completely defined in these rows (ie. merged 2 cells on a row to be shifted).
shiftRows in interface org.apache.poi.ss.usermodel.SheetstartRow - the row to start shiftingendRow - the row to end shiftingn - the number of rows to shiftcopyRowHeight - whether to copy the row height during the shiftresetOriginalRowHeight - whether to set the original row's height to the default
public void createFreezePane(int colSplit,
int rowSplit,
int leftmostColumn,
int topRow)
createFreezePane in interface org.apache.poi.ss.usermodel.SheetcolSplit - Horizonatal position of split.rowSplit - Vertical position of split.leftmostColumn - Left column visible in right pane.topRow - Top row visible in bottom pane
public void createFreezePane(int colSplit,
int rowSplit)
createFreezePane in interface org.apache.poi.ss.usermodel.SheetcolSplit - Horizonatal position of split.rowSplit - Vertical position of split.
public void createSplitPane(int xSplitPos,
int ySplitPos,
int leftmostColumn,
int topRow,
int activePane)
createSplitPane in interface org.apache.poi.ss.usermodel.SheetxSplitPos - Horizonatal position of split (in 1/20th of a point).ySplitPos - Vertical position of split (in 1/20th of a point).topRow - Top row visible in bottom paneleftmostColumn - Left column visible in right pane.activePane - Active pane. One of: PANE_LOWER_RIGHT,
PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFTSheet.PANE_LOWER_LEFT,
Sheet.PANE_LOWER_RIGHT,
Sheet.PANE_UPPER_LEFT,
Sheet.PANE_UPPER_RIGHTpublic org.apache.poi.hssf.util.PaneInformation getPaneInformation()
getPaneInformation in interface org.apache.poi.ss.usermodel.Sheetpublic void setDisplayGridlines(boolean show)
setDisplayGridlines in interface org.apache.poi.ss.usermodel.Sheetshow - whether to show gridlines or notpublic boolean isDisplayGridlines()
isDisplayGridlines in interface org.apache.poi.ss.usermodel.Sheetpublic void setDisplayFormulas(boolean show)
setDisplayFormulas in interface org.apache.poi.ss.usermodel.Sheetshow - whether to show formulas or notpublic boolean isDisplayFormulas()
isDisplayFormulas in interface org.apache.poi.ss.usermodel.Sheetpublic void setDisplayRowColHeadings(boolean show)
setDisplayRowColHeadings in interface org.apache.poi.ss.usermodel.Sheetshow - whether to show RowColHeadings or notpublic boolean isDisplayRowColHeadings()
isDisplayRowColHeadings in interface org.apache.poi.ss.usermodel.Sheetpublic void setRowBreak(int row)
setRowBreak in interface org.apache.poi.ss.usermodel.Sheetrow - FIXME: Document this!public boolean isRowBroken(int row)
isRowBroken in interface org.apache.poi.ss.usermodel.Sheetrow - FIXME: Document this!
public void removeRowBreak(int row)
removeRowBreak in interface org.apache.poi.ss.usermodel.Sheetrow - public int[] getRowBreaks()
getRowBreaks in interface org.apache.poi.ss.usermodel.Sheetpublic int[] getColumnBreaks()
getColumnBreaks in interface org.apache.poi.ss.usermodel.Sheetpublic void setColumnBreak(int column)
setColumnBreak in interface org.apache.poi.ss.usermodel.Sheetcolumn - public boolean isColumnBroken(int column)
isColumnBroken in interface org.apache.poi.ss.usermodel.Sheetcolumn - FIXME: Document this!
public void removeColumnBreak(int column)
removeColumnBreak in interface org.apache.poi.ss.usermodel.Sheetcolumn -
public void setColumnGroupCollapsed(int columnNumber,
boolean collapsed)
setColumnGroupCollapsed in interface org.apache.poi.ss.usermodel.SheetcolumnNumber - One of the columns in the group.collapsed - true = collapse group, false = expand group.
public void groupColumn(int fromColumn,
int toColumn)
groupColumn in interface org.apache.poi.ss.usermodel.SheetfromColumn - beginning of the column range.toColumn - end of the column range.
public void ungroupColumn(int fromColumn,
int toColumn)
ungroupColumn in interface org.apache.poi.ss.usermodel.SheetfromColumn - start column (0-based)toColumn - end column (0-based)
public void groupRow(int fromRow,
int toRow)
Please note the rows being grouped must be in the current window, if the rows are already flushed then groupRow has no effect.
Correct code:
Workbook wb = new SXSSFWorkbook(100); // keep 100 rows in memory
Sheet sh = wb.createSheet();
for (int rownum = 0; rownum < 1000; rownum++) {
Row row = sh.createRow(rownum);
if(rownum == 200) {
sh.groupRow(100, 200);
}
}
Incorrect code:
Workbook wb = new SXSSFWorkbook(100); // keep 100 rows in memory
Sheet sh = wb.createSheet();
for (int rownum = 0; rownum < 1000; rownum++) {
Row row = sh.createRow(rownum);
}
sh.groupRow(100, 200); // the rows in the range [100, 200] are already flushed and groupRows has no effect
groupRow in interface org.apache.poi.ss.usermodel.SheetfromRow - start row (0-based)toRow - end row (0-based)
public void ungroupRow(int fromRow,
int toRow)
ungroupRow in interface org.apache.poi.ss.usermodel.SheetfromRow - start row (0-based)toRow - end row (0-based)
public void setRowGroupCollapsed(int row,
boolean collapse)
setRowGroupCollapsed in interface org.apache.poi.ss.usermodel.Sheetrow - start row of a groupped range of rows (0-based)collapse - whether to expand/collapse the detail rows
public void setDefaultColumnStyle(int column,
org.apache.poi.ss.usermodel.CellStyle style)
setDefaultColumnStyle in interface org.apache.poi.ss.usermodel.Sheetcolumn - the column indexstyle - the style to setpublic void autoSizeColumn(int column)
This process can be relatively slow on large sheets, so this should normally only be called once per column, at the end of your processing.
You can specify whether the content of merged cells should be considered or ignored. Default is to ignore merged cells.
autoSizeColumn in interface org.apache.poi.ss.usermodel.Sheetcolumn - the column index
public void autoSizeColumn(int column,
boolean useMergedCells)
This process can be relatively slow on large sheets, so this should normally only be called once per column, at the end of your processing.
You can specify whether the content of merged cells should be considered or ignored. Default is to ignore merged cells.
autoSizeColumn in interface org.apache.poi.ss.usermodel.Sheetcolumn - the column indexuseMergedCells - whether to use the contents of merged cells when calculating the width of the column
public org.apache.poi.ss.usermodel.Comment getCellComment(int row,
int column)
getCellComment in interface org.apache.poi.ss.usermodel.Sheetnull if not foundpublic org.apache.poi.ss.usermodel.Drawing createDrawingPatriarch()
createDrawingPatriarch in interface org.apache.poi.ss.usermodel.Sheetpublic org.apache.poi.ss.usermodel.Workbook getWorkbook()
getWorkbook in interface org.apache.poi.ss.usermodel.Sheetpublic java.lang.String getSheetName()
getSheetName in interface org.apache.poi.ss.usermodel.Sheetpublic boolean isSelected()
isSelected in interface org.apache.poi.ss.usermodel.Sheettrue if this sheet is currently selected
public org.apache.poi.ss.usermodel.CellRange setArrayFormula(java.lang.String formula,
org.apache.poi.ss.util.CellRangeAddress range)
setArrayFormula in interface org.apache.poi.ss.usermodel.Sheetformula - text representation of the formularange - Region of array formula for result.
CellRange of cells affected by this changepublic org.apache.poi.ss.usermodel.CellRange removeArrayFormula(org.apache.poi.ss.usermodel.Cell cell)
removeArrayFormula in interface org.apache.poi.ss.usermodel.Sheetcell - any cell within Array Formula range
CellRange of cells affected by this changepublic org.apache.poi.ss.usermodel.DataValidationHelper getDataValidationHelper()
getDataValidationHelper in interface org.apache.poi.ss.usermodel.Sheetpublic void addValidationData(org.apache.poi.ss.usermodel.DataValidation dataValidation)
addValidationData in interface org.apache.poi.ss.usermodel.SheetdataValidation - The Data validation object settingspublic org.apache.poi.ss.usermodel.AutoFilter setAutoFilter(org.apache.poi.ss.util.CellRangeAddress range)
setAutoFilter in interface org.apache.poi.ss.usermodel.Sheetrange - the range of cells to filterpublic org.apache.poi.ss.usermodel.SheetConditionalFormatting getSheetConditionalFormatting()
getSheetConditionalFormatting in interface org.apache.poi.ss.usermodel.Sheetpublic void setRandomAccessWindowSize(int value)
public void flushRows(int remaining)
throws java.io.IOException
java.io.IOException
public void flushRows()
throws java.io.IOException
java.io.IOException
public void changeRowNum(SXSSFRow row,
int newRowNum)
public int getRowNum(SXSSFRow row)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||