*
* @return the parent workbook
*/
+ @Override
public HSSFWorkbook getWorkbook() {
return _workbook;
}
* @see org.apache.poi.hssf.usermodel.HSSFRow
* @see #removeRow(org.apache.poi.ss.usermodel.Row)
*/
+ @Override
public HSSFRow createRow(int rownum) {
HSSFRow row = new HSSFRow(_workbook, this, rownum);
// new rows inherit default height from the sheet
*
* @param row representing a row to remove.
*/
+ @Override
public void removeRow(Row row) {
HSSFRow hrow = (HSSFRow) row;
if (row.getSheet() != this) {
* @param rowIndex row to get
* @return HSSFRow representing the row number or null if its not defined on the sheet
*/
+ @Override
public HSSFRow getRow(int rowIndex) {
return _rows.get(Integer.valueOf(rowIndex));
}
/**
* Returns the number of physically defined rows (NOT the number of rows in the sheet)
*/
+ @Override
public int getPhysicalNumberOfRows() {
return _rows.size();
}
*
* @return the number of the first logical row on the sheet, zero based
*/
+ @Override
public int getFirstRowNum() {
return _firstrow;
}
*
* @return the number of the last row contained in this sheet, zero based.
*/
+ @Override
public int getLastRowNum() {
return _lastrow;
}
+ @Override
public List<HSSFDataValidation> getDataValidations() {
DataValidityTable dvt = _sheet.getOrCreateDataValidityTable();
final List<HSSFDataValidation> hssfValidations = new ArrayList<HSSFDataValidation>();
*
* @param dataValidation The Data validation object settings
*/
+ @Override
public void addValidationData(DataValidation dataValidation) {
if (dataValidation == null) {
throw new IllegalArgumentException("objValidation must not be null");
* @param columnIndex - the column to get (0-based)
* @param hidden - the visiblity state of the column
*/
+ @Override
public void setColumnHidden(int columnIndex, boolean hidden) {
_sheet.setColumnHidden(columnIndex, hidden);
}
* @param columnIndex - the column to set (0-based)
* @return hidden - <code>false</code> if the column is visible
*/
+ @Override
public boolean isColumnHidden(int columnIndex) {
return _sheet.isColumnHidden(columnIndex);
}
* @param width - the width in units of 1/256th of a character width
* @throws IllegalArgumentException if width > 255*256 (the maximum column width in Excel is 255 characters)
*/
+ @Override
public void setColumnWidth(int columnIndex, int width) {
_sheet.setColumnWidth(columnIndex, width);
}
* @param columnIndex - the column to set (0-based)
* @return width - the width in units of 1/256th of a character width
*/
+ @Override
public int getColumnWidth(int columnIndex) {
return _sheet.getColumnWidth(columnIndex);
}
+ @Override
public float getColumnWidthInPixels(int column){
int cw = getColumnWidth(column);
int def = getDefaultColumnWidth()*256;
*
* @return default column width
*/
+ @Override
public int getDefaultColumnWidth() {
return _sheet.getDefaultColumnWidth();
}
*
* @param width default column width
*/
+ @Override
public void setDefaultColumnWidth(int width) {
_sheet.setDefaultColumnWidth(width);
}
*
* @return default row height
*/
+ @Override
public short getDefaultRowHeight() {
return _sheet.getDefaultRowHeight();
}
*
* @return default row height in points
*/
-
+ @Override
public float getDefaultRowHeightInPoints() {
return ((float) _sheet.getDefaultRowHeight() / 20);
}
*
* @param height default row height
*/
-
+ @Override
public void setDefaultRowHeight(short height) {
_sheet.setDefaultRowHeight(height);
}
*
* @param height default row height
*/
-
+ @Override
public void setDefaultRowHeightInPoints(float height) {
_sheet.setDefaultRowHeight((short) (height * 20));
}
* (0 based) column, or null if no style has been
* set for that column
*/
+ @Override
public HSSFCellStyle getColumnStyle(int column) {
short styleIndex = _sheet.getXFIndexForColAt((short) column);
*
* @return true if printed
*/
-
public boolean isGridsPrinted() {
return _sheet.isGridsPrinted();
}
*
* @param value false if not printed.
*/
-
public void setGridsPrinted(boolean value) {
_sheet.setGridsPrinted(value);
}
* @throws IllegalStateException if region intersects with an existing merged region
* or multi-cell array formula on this sheet
*/
+ @Override
public int addMergedRegion(CellRangeAddress region) {
region.validate(SpreadsheetVersion.EXCEL97);
* Alias for {@link #rowIterator()} to allow
* foreach loops
*/
+ @Override
public Iterator<Row> iterator() {
return rowIterator();
}
*
* @return Sheet - low level representation of this HSSFSheet.
*/
- InternalSheet getSheet() {
+ /*package*/ InternalSheet getSheet() {
return _sheet;
}
*
* @param b whether to show auto page breaks
*/
+ @Override
public void setAutobreaks(boolean b) {
WSBoolRecord record =
(WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);
*
* @param b guts or no guts (or glory)
*/
+ @Override
public void setDisplayGuts(boolean b) {
WSBoolRecord record =
(WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);
*
* @param b fit or not
*/
+ @Override
public void setFitToPage(boolean b) {
WSBoolRecord record =
(WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);
*
* @param b below or not
*/
+ @Override
public void setRowSumsBelow(boolean b) {
WSBoolRecord record =
(WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);
*
* @param b right or not
*/
+ @Override
public void setRowSumsRight(boolean b) {
WSBoolRecord record =
(WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid);
*
* @return whether to show auto page breaks
*/
+ @Override
public boolean getAutobreaks() {
return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid))
.getAutobreaks();
*
* @return guts or no guts (or glory)
*/
+ @Override
public boolean getDisplayGuts() {
return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid))
.getDisplayGuts();
*
* @return whether all zero values on the worksheet are displayed
*/
+ @Override
public boolean isDisplayZeros() {
return _sheet.getWindowTwo().getDisplayZeros();
}
*
* @param value whether to display or hide all zero values on the worksheet
*/
+ @Override
public void setDisplayZeros(boolean value) {
_sheet.getWindowTwo().setDisplayZeros(value);
}
*
* @return fit or not
*/
+ @Override
public boolean getFitToPage() {
return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid))
.getFitToPage();
*
* @return below or not
*/
+ @Override
public boolean getRowSumsBelow() {
return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid))
.getRowSumsBelow();
*
* @return right or not
*/
+ @Override
public boolean getRowSumsRight() {
return ((WSBoolRecord) _sheet.findFirstRecordBySid(WSBoolRecord.sid))
.getRowSumsRight();
*
* @return Gridlines are printed
*/
+ @Override
public boolean isPrintGridlines() {
return getSheet().getPrintGridlines().getPrintGridlines();
}
* @param newPrintGridlines boolean to turn on or off the printing of
* gridlines
*/
+ @Override
public void setPrintGridlines(boolean newPrintGridlines) {
getSheet().getPrintGridlines().setPrintGridlines(newPrintGridlines);
}
*
* @return The user model for the print setup object.
*/
+ @Override
public HSSFPrintSetup getPrintSetup() {
return new HSSFPrintSetup(_sheet.getPageSettings().getPrintSetup());
}
+ @Override
public HSSFHeader getHeader() {
return new HSSFHeader(_sheet.getPageSettings());
}
+ @Override
public HSSFFooter getFooter() {
return new HSSFFooter(_sheet.getPageSettings());
}
*
* @return <code>true</code> if this sheet is currently selected
*/
+ @Override
public boolean isSelected() {
return getSheet().getWindowTwo().getSelected();
}
*
* @param sel Whether to select the sheet or deselect the sheet.
*/
+ @Override
public void setSelected(boolean sel) {
getSheet().getWindowTwo().setSelected(sel);
}
* @param margin which margin to get
* @return the size of the margin
*/
+ @Override
public double getMargin(short margin) {
switch (margin) {
case FooterMargin:
* @param margin which margin to get
* @param size the size of the margin
*/
+ @Override
public void setMargin(short margin, double size) {
switch (margin) {
case FooterMargin:
*
* @return true => protection enabled; false => protection disabled
*/
+ @Override
public boolean getProtect() {
return getProtectionBlock().isSheetProtected();
}
*
* @return true => protection enabled; false => protection disabled
*/
+ @Override
public boolean getScenarioProtect() {
return getProtectionBlock().isScenarioProtected();
}
*
* @param password to set for protection. Pass <code>null</code> to remove protection
*/
+ @Override
public void protectSheet(String password) {
getProtectionBlock().protectSheet(password, true, true); //protect objs&scenarios(normal)
}
*
* @return short indicating the rownum (0 based) of the top row
*/
+ @Override
public short getTopRow() {
return _sheet.getTopRow();
}
*
* @return short indicating the rownum (0 based) of the top row
*/
+ @Override
public short getLeftCol() {
return _sheet.getLeftCol();
}
* @param leftmostColumn Left column visible in right pane.
* @param topRow Top row visible in bottom pane
*/
+ @Override
public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow) {
validateColumn(colSplit);
validateRow(rowSplit);
* @param colSplit Horizonatal position of split.
* @param rowSplit Vertical position of split.
*/
+ @Override
public void createFreezePane(int colSplit, int rowSplit) {
createFreezePane(colSplit, rowSplit, colSplit, rowSplit);
}
* @see #PANE_UPPER_LEFT
* @see #PANE_UPPER_RIGHT
*/
+ @Override
public void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane) {
getSheet().createSplitPane(xSplitPos, ySplitPos, topRow, leftmostColumn, activePane);
}
*
* @return null if no pane configured, or the pane information.
*/
+ @Override
public PaneInformation getPaneInformation() {
return getSheet().getPaneInformation();
}
*
* @param show whether to show gridlines or not
*/
+ @Override
public void setDisplayGridlines(boolean show) {
_sheet.setDisplayGridlines(show);
}
*
* @return whether gridlines are displayed
*/
+ @Override
public boolean isDisplayGridlines() {
return _sheet.isDisplayGridlines();
}
*
* @param show whether to show formulas or not
*/
+ @Override
public void setDisplayFormulas(boolean show) {
_sheet.setDisplayFormulas(show);
}
*
* @return whether formulas are displayed
*/
+ @Override
public boolean isDisplayFormulas() {
return _sheet.isDisplayFormulas();
}
*
* @param show whether to show RowColHeadings or not
*/
+ @Override
public void setDisplayRowColHeadings(boolean show) {
_sheet.setDisplayRowColHeadings(show);
}
*
* @return whether RowColHeadings are displayed
*/
+ @Override
public boolean isDisplayRowColHeadings() {
return _sheet.isDisplayRowColHeadings();
}
*
* @param row the row to break, inclusive
*/
+ @Override
public void setRowBreak(int row) {
validateRow(row);
_sheet.getPageSettings().setRowBreak(row, (short) 0, (short) 255);
/**
* @return <code>true</code> if there is a page break at the indicated row
*/
+ @Override
public boolean isRowBroken(int row) {
return _sheet.getPageSettings().isRowBroken(row);
}
/**
* Removes the page break at the indicated row
*/
+ @Override
public void removeRowBreak(int row) {
_sheet.getPageSettings().removeRowBreak(row);
}
/**
* @return row indexes of all the horizontal page breaks, never <code>null</code>
*/
+ @Override
public int[] getRowBreaks() {
//we can probably cache this information, but this should be a sparsely used function
return _sheet.getPageSettings().getRowBreaks();
/**
* @return column indexes of all the vertical page breaks, never <code>null</code>
*/
+ @Override
public int[] getColumnBreaks() {
//we can probably cache this information, but this should be a sparsely used function
return _sheet.getPageSettings().getColumnBreaks();
*
* @param column the column to break, inclusive
*/
+ @Override
public void setColumnBreak(int column) {
validateColumn((short) column);
_sheet.getPageSettings().setColumnBreak((short) column, (short) 0, (short) SpreadsheetVersion.EXCEL97.getLastRowIndex());
* @param column FIXME: Document this!
* @return FIXME: Document this!
*/
+ @Override
public boolean isColumnBroken(int column) {
return _sheet.getPageSettings().isColumnBroken(column);
}
*
* @param column
*/
+ @Override
public void removeColumnBreak(int column) {
_sheet.getPageSettings().removeColumnBreak(column);
}
*
* @return the top-level drawing patriarch, if there is one, else returns null
*/
+ @Override
public HSSFPatriarch getDrawingPatriarch() {
_patriarch = getPatriarch(false);
return _patriarch;
*
* @return The new patriarch.
*/
+ @Override
public HSSFPatriarch createDrawingPatriarch() {
_patriarch = getPatriarch(true);
return _patriarch;
* @param columnNumber One of the columns in the group.
* @param collapsed true = collapse group, false = expand group.
*/
+ @Override
public void setColumnGroupCollapsed(int columnNumber, boolean collapsed) {
_sheet.setColumnGroupCollapsed(columnNumber, collapsed);
}
* @param fromColumn beginning of the column range.
* @param toColumn end of the column range.
*/
+ @Override
public void groupColumn(int fromColumn, int toColumn) {
_sheet.groupColumnRange(fromColumn, toColumn, true);
}
+ @Override
public void ungroupColumn(int fromColumn, int toColumn) {
_sheet.groupColumnRange(fromColumn, toColumn, false);
}
* @param fromRow start row (0-based)
* @param toRow end row (0-based)
*/
+ @Override
public void groupRow(int fromRow, int toRow) {
_sheet.groupRowRange(fromRow, toRow, true);
}
+ @Override
public void ungroupRow(int fromRow, int toRow) {
_sheet.groupRowRange(fromRow, toRow, false);
}
+ @Override
public void setRowGroupCollapsed(int rowIndex, boolean collapse) {
if (collapse) {
_sheet.getRowsAggregate().collapseRow(rowIndex);
* @param column the column index
* @param style the style to set
*/
+ @Override
public void setDefaultColumnStyle(int column, CellStyle style) {
_sheet.setDefaultColumnStyle(column, ((HSSFCellStyle) style).getIndex());
}
*
* @param column the column index
*/
+ @Override
public void autoSizeColumn(int column) {
autoSizeColumn(column, false);
}
* @param column the column index
* @param useMergedCells whether to use the contents of merged cells when calculating the width of the column
*/
+ @Override
public void autoSizeColumn(int column, boolean useMergedCells) {
double width = SheetUtil.getColumnWidth(this, column, useMergedCells);
}
}
+ @Override
public HSSFSheetConditionalFormatting getSheetConditionalFormatting() {
return new HSSFSheetConditionalFormatting(this);
}
*
* @return the name of this sheet
*/
+ @Override
public String getSheetName() {
HSSFWorkbook wb = getWorkbook();
int idx = wb.getSheetIndex(this);
return SSCellRange.create(firstRow, firstColumn, height, width, temp, HSSFCell.class);
}
+ @Override
public CellRange<HSSFCell> setArrayFormula(String formula, CellRangeAddress range) {
// make sure the formula parses OK first
int sheetIndex = _workbook.getSheetIndex(this);
return cells;
}
-
+ @Override
public CellRange<HSSFCell> removeArrayFormula(Cell cell) {
if (cell.getSheet() != this) {
throw new IllegalArgumentException("Specified cell does not belong to this sheet.");
return result;
}
+ @Override
public DataValidationHelper getDataValidationHelper() {
return new HSSFDataValidationHelper(this);
}
+ @Override
public HSSFAutoFilter setAutoFilter(CellRangeAddress range) {
InternalWorkbook workbook = _workbook.getWorkbook();
int sheetIndex = _workbook.getSheetIndex(this);
}
}
+ @Override
public CellRangeAddress getRepeatingRows() {
return getRepeatingRowsOrColums(true);
}
-
+ @Override
public CellRangeAddress getRepeatingColumns() {
return getRepeatingRowsOrColums(false);
}
-
+ @Override
public void setRepeatingRows(CellRangeAddress rowRangeRef) {
CellRangeAddress columnRangeRef = getRepeatingColumns();
setRepeatingRowsAndColumns(rowRangeRef, columnRangeRef);
}
-
+ @Override
public void setRepeatingColumns(CellRangeAddress columnRangeRef) {
CellRangeAddress rowRangeRef = getRepeatingRows();
setRepeatingRowsAndColumns(rowRangeRef, columnRangeRef);
* put it into more groups (outlines), reduced as
* you take it out of them.
*/
+ @Override
public int getColumnOutlineLevel(int columnIndex) {
return _sheet.getColumnOutlineLevel(columnIndex);
}
import org.apache.poi.ss.util.CellAddress;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.util.SheetUtil;
+import org.apache.poi.util.Internal;
import org.apache.poi.xssf.usermodel.XSSFComment;
import org.apache.poi.xssf.usermodel.XSSFDataValidation;
import org.apache.poi.xssf.usermodel.XSSFHyperlink;
/**
* for testing purposes only
*/
+ @Internal
SheetDataWriter getSheetDataWriter(){
return _writer;
}
}
//start of interface implementation
+ @Override
public Iterator<Row> iterator()
{
return rowIterator();
* a rownum is provided where the row is already flushed to disk.
* @see #removeRow(Row)
*/
+ @Override
public SXSSFRow createRow(int rownum)
{
int maxrow = SpreadsheetVersion.EXCEL2007.getLastRowIndex();
*
* @param row representing a row to remove.
*/
+ @Override
public void removeRow(Row row)
{
if (row.getSheet() != this) {
* @param rownum row to get (0-based)
* @return Row representing the rownumber or null if its not defined on the sheet
*/
+ @Override
public SXSSFRow getRow(int rownum)
{
return _rows.get(rownum);
*
* @return the number of physically defined rows in this sheet
*/
+ @Override
public int getPhysicalNumberOfRows()
{
return _rows.size()+_writer.getNumberOfFlushedRows();
*
* @return the number of the first logical row on the sheet (0-based)
*/
+ @Override
public int getFirstRowNum()
{
if(_writer.getNumberOfFlushedRows() > 0)
*
* @return last row contained n this sheet (0-based)
*/
+ @Override
public int getLastRowNum()
{
return _rows.size() == 0 ? 0 : _rows.lastKey();
* @param columnIndex - the column to get (0-based)
* @param hidden - the visiblity state of the column
*/
+ @Override
public void setColumnHidden(int columnIndex, boolean hidden)
{
_sh.setColumnHidden(columnIndex,hidden);
* @param columnIndex - the column to set (0-based)
* @return hidden - <code>false</code> if the column is visible
*/
+ @Override
public boolean isColumnHidden(int columnIndex)
{
return _sh.isColumnHidden(columnIndex);
* @param columnIndex - the column to set (0-based)
* @param width - the width in units of 1/256th of a character width
*/
+ @Override
public void setColumnWidth(int columnIndex, int width)
{
_sh.setColumnWidth(columnIndex,width);
* @param columnIndex - the column to set (0-based)
* @return width - the width in units of 1/256th of a character width
*/
+ @Override
public int getColumnWidth(int columnIndex)
{
return _sh.getColumnWidth(columnIndex);
*
* @param width default column width measured in characters
*/
+ @Override
public void setDefaultColumnWidth(int width)
{
_sh.setDefaultColumnWidth(width);
*
* @return default column width measured in characters
*/
+ @Override
public int getDefaultColumnWidth()
{
return _sh.getDefaultColumnWidth();
*
* @return default row height measured in twips (1/20 of a point)
*/
+ @Override
public short getDefaultRowHeight()
{
return _sh.getDefaultRowHeight();
*
* @return default row height in points
*/
+ @Override
public float getDefaultRowHeightInPoints()
{
return _sh.getDefaultRowHeightInPoints();
*
* @param height default row height measured in twips (1/20 of a point)
*/
+ @Override
public void setDefaultRowHeight(short height)
{
_sh.setDefaultRowHeight(height);
* points
* @param height default row height
*/
+ @Override
public void setDefaultRowHeightInPoints(float height)
{
_sh.setDefaultRowHeightInPoints(height);
* (0 based) column, or null if no style has been
* set for that column
*/
+ @Override
public CellStyle getColumnStyle(int column)
{
return _sh.getColumnStyle(column);
* @param region (rowfrom/colfrom-rowto/colto) to merge
* @return index of this region
*/
+ @Override
public int addMergedRegion(CellRangeAddress region)
{
return _sh.addMergedRegion(region);
*
* @param value true to vertically center, false otherwise.
*/
+ @Override
public void setVerticallyCenter(boolean value)
{
_sh.setVerticallyCenter(value);
*
* @param value true to horizontally center, false otherwise.
*/
+ @Override
public void setHorizontallyCenter(boolean value)
{
_sh.setHorizontallyCenter(value);
/**
* Determine whether printed output for this sheet will be horizontally centered.
*/
-
+ @Override
public boolean getHorizontallyCenter()
{
return _sh.getHorizontallyCenter();
/**
* Determine whether printed output for this sheet will be vertically centered.
*/
+ @Override
public boolean getVerticallyCenter()
{
return _sh.getVerticallyCenter();
*
* @param index of the region to unmerge
*/
+ @Override
public void removeMergedRegion(int index)
{
_sh.removeMergedRegion(index);
*
* @return number of merged regions
*/
+ @Override
public int getNumMergedRegions()
{
return _sh.getNumMergedRegions();
*
* @return the merged region at the specified index
*/
+ @Override
public CellRangeAddress getMergedRegion(int index)
{
return _sh.getMergedRegion(index);
* @return an iterator of the PHYSICAL rows. Meaning the 3rd element may not
* be the third row if say for instance the second row is undefined.
*/
+ @Override
public Iterator<Row> rowIterator()
{
@SuppressWarnings("unchecked")
*
* @param value <code>true</code> if the sheet displays Automatic Page Breaks.
*/
+ @Override
public void setAutobreaks(boolean value)
{
_sh.setAutobreaks(value);
*
* @param value - guts or no guts
*/
+ @Override
public void setDisplayGuts(boolean value)
{
_sh.setDisplayGuts(value);
*
* @param value whether to display or hide all zero values on the worksheet
*/
+ @Override
public void setDisplayZeros(boolean value)
{
_sh.setDisplayZeros(value);
*
* @return whether all zero values on the worksheet are displayed
*/
+ @Override
public boolean isDisplayZeros()
{
return _sh.isDisplayZeros();
*
* @param value true for right to left, false otherwise.
*/
+ @Override
public void setRightToLeft(boolean value)
{
_sh.setRightToLeft(value);
*
* @return whether the text is displayed in right-to-left mode in the window
*/
+ @Override
public boolean isRightToLeft()
{
return _sh.isRightToLeft();
*
* @param value <code>true</code> if the Fit to Page print option is enabled.
*/
+ @Override
public void setFitToPage(boolean value)
{
_sh.setFitToPage(value);
* </p>
* @param value <code>true</code> if row summaries appear below detail in the outline
*/
+ @Override
public void setRowSumsBelow(boolean value)
{
_sh.setRowSumsBelow(value);
* </p>
* @param value <code>true</code> if col summaries appear right of the detail in the outline
*/
+ @Override
public void setRowSumsRight(boolean value)
{
_sh.setRowSumsRight(value);
*
* @return <code>true</code> if the sheet displays Automatic Page Breaks.
*/
+ @Override
public boolean getAutobreaks()
{
return _sh.getAutobreaks();
*
* @return boolean - guts or no guts
*/
+ @Override
public boolean getDisplayGuts()
{
return _sh.getDisplayGuts();
*
* @return <code>true</code> if the Fit to Page print option is enabled.
*/
+ @Override
public boolean getFitToPage()
{
return _sh.getFitToPage();
* </p>
* @return <code>true</code> if row summaries appear below detail in the outline
*/
+ @Override
public boolean getRowSumsBelow()
{
return _sh.getRowSumsBelow();
* </p>
* @return <code>true</code> if col summaries appear right of the detail in the outline
*/
+ @Override
public boolean getRowSumsRight()
{
return _sh.getRowSumsRight();
* @return <code>true</code> if this sheet displays gridlines.
* @see #isPrintGridlines() to check if printing of gridlines is turned on or off
*/
+ @Override
public boolean isPrintGridlines()
{
return _sh.isPrintGridlines();
* @param show <code>true</code> if this sheet should display gridlines.
* @see #setPrintGridlines(boolean)
*/
+ @Override
public void setPrintGridlines(boolean show)
{
_sh.setPrintGridlines(show);
*
* @return The user model for the print setup object.
*/
+ @Override
public PrintSetup getPrintSetup()
{
return _sh.getPrintSetup();
* </p>
* @return the document header. Never <code>null</code>
*/
+ @Override
public Header getHeader()
{
return _sh.getHeader();
*
* @return the document footer. Never <code>null</code>
*/
+ @Override
public Footer getFooter()
{
return _sh.getFooter();
* @param value <code>true</code> if this sheet is selected
* @see Workbook#setActiveSheet(int)
*/
+ @Override
public void setSelected(boolean value)
{
_sh.setSelected(value);
* @param margin which margin to get
* @return the size of the margin
*/
+ @Override
public double getMargin(short margin)
{
return _sh.getMargin(margin);
* @param margin which margin to get
* @param size the size of the margin
*/
+ @Override
public void setMargin(short margin, double size)
{
_sh.setMargin(margin,size);
*
* @return true => protection enabled; false => protection disabled
*/
+ @Override
public boolean getProtect()
{
return _sh.getProtect();
* recommended solution, but this may be used for certain cases where
* evaluation in POI is not possible.
*/
+ @Override
public void setForceFormulaRecalculation(boolean value) {
_sh.setForceFormulaRecalculation(value);
}
* Whether Excel will be asked to recalculate all formulas when the
* workbook is opened.
*/
+ @Override
public boolean getForceFormulaRecalculation() {
return _sh.getForceFormulaRecalculation();
}
/**
+ * <i>Not implemented for SXSSFSheets</i>
+ *
* Shifts rows between startRow and endRow n number of rows.
* If you use a negative number, it will shift rows up.
* Code ensures that rows don't wrap around.
* @param endRow the row to end shifting
* @param n the number of rows to shift
*/
+ @Override
public void shiftRows(int startRow, int endRow, int n)
{
throw new RuntimeException("NotImplemented");
}
/**
+ * <i>Not implemented for SXSSFSheets</i>
+ *
* Shifts rows between startRow and endRow n number of rows.
* If you use a negative number, it will shift rows up.
* Code ensures that rows don't wrap around
* @param copyRowHeight whether to copy the row height during the shift
* @param resetOriginalRowHeight whether to set the original row's height to the default
*/
+ @Override
public void shiftRows(int startRow, int endRow, int n, boolean copyRowHeight, boolean resetOriginalRowHeight)
{
throw new RuntimeException("NotImplemented");
* @param leftmostColumn Left column visible in right pane.
* @param topRow Top row visible in bottom pane
*/
+ @Override
public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow)
{
_sh.createFreezePane(colSplit, rowSplit, leftmostColumn, topRow);
* @param colSplit Horizonatal position of split.
* @param rowSplit Vertical position of split.
*/
+ @Override
public void createFreezePane(int colSplit, int rowSplit)
{
_sh.createFreezePane(colSplit,rowSplit);
* @see #PANE_UPPER_LEFT
* @see #PANE_UPPER_RIGHT
*/
+ @Override
public void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane)
{
_sh.createSplitPane(xSplitPos, ySplitPos, leftmostColumn, topRow, activePane);
*
* @return null if no pane configured, or the pane information.
*/
+ @Override
public PaneInformation getPaneInformation()
{
return _sh.getPaneInformation();
*
* @param show whether to show gridlines or not
*/
+ @Override
public void setDisplayGridlines(boolean show)
{
_sh.setDisplayGridlines(show);
*
* @return whether gridlines are displayed
*/
+ @Override
public boolean isDisplayGridlines()
{
return _sh.isDisplayGridlines();
*
* @param show whether to show formulas or not
*/
+ @Override
public void setDisplayFormulas(boolean show)
{
_sh.setDisplayFormulas(show);
*
* @return whether formulas are displayed
*/
+ @Override
public boolean isDisplayFormulas()
{
return _sh.isDisplayFormulas();
*
* @param show whether to show RowColHeadings or not
*/
+ @Override
public void setDisplayRowColHeadings(boolean show)
{
_sh.setDisplayRowColHeadings(show);
* Returns if RowColHeadings are displayed.
* @return whether RowColHeadings are displayed
*/
+ @Override
public boolean isDisplayRowColHeadings()
{
return _sh.isDisplayRowColHeadings();
* Sets a page break at the indicated row
* @param row FIXME: Document this!
*/
+ @Override
public void setRowBreak(int row)
{
_sh.setRowBreak(row);
* @param row FIXME: Document this!
* @return FIXME: Document this!
*/
+ @Override
public boolean isRowBroken(int row)
{
return _sh.isRowBroken(row);
* Removes the page break at the indicated row
* @param row
*/
+ @Override
public void removeRowBreak(int row)
{
_sh.removeRowBreak(row);
* Retrieves all the horizontal page breaks
* @return all the horizontal page breaks, or null if there are no row page breaks
*/
+ @Override
public int[] getRowBreaks()
{
return _sh.getRowBreaks();
* Retrieves all the vertical page breaks
* @return all the vertical page breaks, or null if there are no column page breaks
*/
+ @Override
public int[] getColumnBreaks()
{
return _sh.getColumnBreaks();
* Sets a page break at the indicated column
* @param column
*/
+ @Override
public void setColumnBreak(int column)
{
_sh.setColumnBreak(column);
* @param column FIXME: Document this!
* @return FIXME: Document this!
*/
+ @Override
public boolean isColumnBroken(int column)
{
return _sh.isColumnBroken(column);
* Removes a page break at the indicated column
* @param column
*/
+ @Override
public void removeColumnBreak(int column)
{
_sh.removeColumnBreak(column);
* @param columnNumber One of the columns in the group.
* @param collapsed true = collapse group, false = expand group.
*/
+ @Override
public void setColumnGroupCollapsed(int columnNumber, boolean collapsed)
{
_sh.setColumnGroupCollapsed(columnNumber, collapsed);
* @param fromColumn beginning of the column range.
* @param toColumn end of the column range.
*/
+ @Override
public void groupColumn(int fromColumn, int toColumn)
{
_sh.groupColumn(fromColumn,toColumn);
* @param fromColumn start column (0-based)
* @param toColumn end column (0-based)
*/
+ @Override
public void ungroupColumn(int fromColumn, int toColumn)
{
_sh.ungroupColumn(fromColumn, toColumn);
* @param fromRow start row (0-based)
* @param toRow end row (0-based)
*/
+ @Override
public void groupRow(int fromRow, int toRow)
{
for(SXSSFRow row : _rows.subMap(fromRow, toRow + 1).values()){
* @param fromRow start row (0-based)
* @param toRow end row (0-based)
*/
+ @Override
public void ungroupRow(int fromRow, int toRow)
{
_sh.ungroupRow(fromRow, toRow);
* @param row start row of a groupped range of rows (0-based)
* @param collapse whether to expand/collapse the detail rows
*/
+ @Override
public void setRowGroupCollapsed(int row, boolean collapse)
{
if (collapse) {
* @param column the column index
* @param style the style to set
*/
+ @Override
public void setDefaultColumnStyle(int column, CellStyle style)
{
_sh.setDefaultColumnStyle(column, style);
*
* @param column the column index
*/
+ @Override
public void autoSizeColumn(int column)
{
autoSizeColumn(column, false);
* @param column the column index
* @param useMergedCells whether to use the contents of merged cells when calculating the width of the column
*/
+ @Override
public void autoSizeColumn(int column, boolean useMergedCells)
{
double width = SheetUtil.getColumnWidth(this, column, useMergedCells);
public List<XSSFHyperlink> getHyperlinkList() {
return _sh.getHyperlinkList();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Drawing getDrawingPatriarch()
+ {
+ return _sh.getDrawingPatriarch();
+ }
/**
* Creates the top-level drawing patriarch.
*
* @return The new drawing patriarch.
*/
+ @Override
public Drawing createDrawingPatriarch()
{
return _sh.createDrawingPatriarch();
*
* @return the parent workbook
*/
+ @Override
public SXSSFWorkbook getWorkbook()
{
return _workbook;
*
* @return the name of this sheet
*/
+ @Override
public String getSheetName()
{
return _sh.getSheetName();
* Note - this is not the same as whether the sheet is focused (isActive)
* @return <code>true</code> if this sheet is currently selected
*/
+ @Override
public boolean isSelected()
{
return _sh.isSelected();
* @param range Region of array formula for result.
* @return the {@link CellRange} of cells affected by this change
*/
+ @Override
public CellRange<? extends Cell> setArrayFormula(String formula, CellRangeAddress range)
{
return _sh.setArrayFormula(formula, range);
* @param cell any cell within Array Formula range
* @return the {@link CellRange} of cells affected by this change
*/
+ @Override
public CellRange<? extends Cell> removeArrayFormula(Cell cell)
{
return _sh.removeArrayFormula(cell);
}
+ @Override
public DataValidationHelper getDataValidationHelper()
{
return _sh.getDataValidationHelper();
}
+ @Override
public List<XSSFDataValidation> getDataValidations()
{
return _sh.getDataValidations();
* Creates a data validation object
* @param dataValidation The Data validation object settings
*/
+ @Override
public void addValidationData(DataValidation dataValidation)
{
_sh.addValidationData(dataValidation);
*
* @param range the range of cells to filter
*/
+ @Override
public AutoFilter setAutoFilter(CellRangeAddress range)
{
return _sh.setAutoFilter(range);
}
+ @Override
public SheetConditionalFormatting getSheetConditionalFormatting(){
return _sh.getSheetConditionalFormatting();
}
+ @Override
public CellRangeAddress getRepeatingRows() {
return _sh.getRepeatingRows();
}
+ @Override
public CellRangeAddress getRepeatingColumns() {
return _sh.getRepeatingColumns();
}
+ @Override
public void setRepeatingRows(CellRangeAddress rowRangeRef) {
_sh.setRepeatingRows(rowRangeRef);
}
+ @Override
public void setRepeatingColumns(CellRangeAddress columnRangeRef) {
_sh.setRepeatingColumns(columnRangeRef);
}
return _writer.dispose();
}
+ @Override
public int getColumnOutlineLevel(int columnIndex) {
return _sh.getColumnOutlineLevel(columnIndex);
}