Java org.apache.poi.xssf.usermodel XSSFSheet fields, constructors, methods, implement or subclass

Example usage for Java org.apache.poi.xssf.usermodel XSSFSheet fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.poi.xssf.usermodel XSSFSheet.

The text is from its open source code.

Method

intaddMergedRegion(CellRangeAddress region)
Adds a merged region of cells on a sheet.
voidaddValidationData(DataValidation dataValidation)
voidautoSizeColumn(int column)
Adjusts the column width to fit the contents.
voidautoSizeColumn(int column, boolean useMergedCells)
Adjusts the column width to fit the contents.
XSSFDrawingcreateDrawingPatriarch()
Create a new SpreadsheetML drawing.
voidcreateFreezePane(int colSplit, int rowSplit)
Creates a split (freezepane).
XSSFPivotTablecreatePivotTable(AreaReference source, CellReference position)
Create a pivot table using the AreaReference range, at the given position.
XSSFPivotTablecreatePivotTable(Name source, CellReference position)
Create a pivot table using the Name range, at the given position.
XSSFPivotTablecreatePivotTable(final Table source, CellReference position)
Create a pivot table using the Table, at the given position.
XSSFPivotTablecreatePivotTable(final AreaReference source, CellReference position, Sheet sourceSheet)
Create a pivot table using the AreaReference range on sourceSheet, at the given position.
XSSFPivotTablecreatePivotTable(CellReference position, Sheet sourceSheet, PivotTableReferenceConfigurator refConfig)
Create a pivot table using the AreaReference or named/table range on sourceSheet, at the given position.
XSSFPivotTablecreatePivotTable(final Name source, CellReference position, Sheet sourceSheet)
Create a pivot table using the Name range reference on sourceSheet, at the given position.
XSSFRowcreateRow(int rownum)
Create a new row within the sheet and return the high level representation Note: If a row already exists at this position, it is removed/overwritten and any existing cell is removed!
XSSFTablecreateTable()
Creates a new Table, and associates it with this Sheet.
voidenableLocking()
Enable sheet protection
CellAddressgetActiveCell()
Return location of the active cell, e.g.
XSSFCommentgetCellComment(CellAddress address)
Return cell comment at row, column, if one exists.
MapgetCellComments()
Returns all cell comments on this sheet.
ColumnHelpergetColumnHelper()
intgetColumnWidth(int columnIndex)
Get the actual column width (in units of 1/256th of a character width )

Note, the returned value is always gerater that #getDefaultColumnWidth() because the latter does not include margins.

floatgetColumnWidthInPixels(int columnIndex)
Get the actual column width in pixels

Please note, that this method works correctly only for workbooks with the default font size (Calibri 11pt for .xlsx).

CTWorksheetgetCTWorksheet()
Provide access to the CTWorksheet bean holding this sheet's data
XSSFDrawinggetDrawingPatriarch()
Return the sheet's existing drawing, or null if there isn't yet one.
FootergetEvenFooter()
Returns the even footer.
HeadergetEvenHeader()
Returns the even header.
FootergetFirstFooter()
Returns the first page footer.
HeadergetFirstHeader()
Returns the first page header.
intgetFirstRowNum()
Gets the first row on the sheet
HeadergetHeader()
Returns the default header for the sheet, creating one as needed.
intgetLastRowNum()
shortgetLeftCol()
doublegetMargin(short margin)
Gets the size of the margin in inches.
CellRangeAddressgetMergedRegion(int index)
Returns the merged region at the specified index.
intgetNumMergedRegions()
Returns the number of merged regions defined in this worksheet
FootergetOddFooter()
Returns the odd footer.
HeadergetOddHeader()
Returns the odd header.
PackagePartgetPackagePart()
Provides access to the underlying PackagePart
PaneInformationgetPaneInformation()
Returns the information regarding the currently configured pane (split or freeze).
intgetPhysicalNumberOfRows()
Returns the number of physically defined rows (NOT the number of rows in the sheet)
XSSFPrintSetupgetPrintSetup()
Gets the print setup object.
ListgetRelations()
Returns the list of child relations for this POIXMLDocumentPart
XSSFRowgetRow(int rownum)
Returns the logical row ( 0-based).
booleangetRowSumsBelow()
Flag indicating whether summary rows appear below detail in an outline, when applying an outline.
XSSFSheetConditionalFormattinggetSheetConditionalFormatting()
StringgetSheetName()
Returns the name of this sheet
ListgetTables()
Returns any tables associated with this Sheet
shortgetTopRow()
The top row in the visible view when the sheet is first viewed after opening it in a viewer
XSSFWorkbookgetWorkbook()
Returns the parent XSSFWorkbook
voidgroupRow(int fromRow, int toRow)
Tie a range of cell together so that they can be collapsed or expanded
booleanhasComments()
Does this sheet have any comments on it?
booleanisDisplayGridlines()
Gets the flag indicating whether this sheet displays the lines between rows and columns to make editing and reading easier.
booleanisSelected()
Returns a flag indicating whether this sheet is selected.
Iteratoriterator()
Alias for #rowIterator() to allow foreach loops
voidprotectSheet(String password)
Enables sheet protection and sets the password for the sheet.
voidremoveMergedRegion(int index)
Removes a merged region of cells (hence letting them free)
voidremoveRow(Row row)
Remove a row from this sheet.
IteratorrowIterator()
voidsetActiveCell(CellAddress address)
voidsetAutobreaks(boolean value)
Flag indicating whether the sheet displays Automatic Page Breaks.
XSSFAutoFiltersetAutoFilter(CellRangeAddress range)
voidsetColumnBreak(int column)
Sets a page break at the indicated column.
voidsetColumnHidden(int columnIndex, boolean hidden)
Get the visibility state for a given column.
voidsetColumnWidth(int columnIndex, int width)
Set the width (in units of 1/256th of a character width)

The maximum column width for an individual cell is 255 characters.

voidsetDefaultColumnStyle(int column, CellStyle style)
voidsetDefaultColumnWidth(int width)
Specifies the number of characters of the maximum digit width of the normal style's font.
voidsetDefaultRowHeight(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)
voidsetDisplayGridlines(boolean show)
Sets the flag indicating whether this sheet should display the lines between rows and columns to make editing and reading easier.
voidsetFitToPage(boolean b)
Flag indicating whether the Fit to Page print option is enabled.
voidsetForceFormulaRecalculation(boolean value)
Control if Excel should be asked to recalculate all formulas on this sheet when the workbook is opened.
voidsetHorizontallyCenter(boolean value)
Center on page horizontally when printing.
voidsetMargin(short margin, double size)
Sets the size of the margin in inches.
voidsetPrintGridlines(boolean value)
Turns on or off the printing of gridlines.
voidsetRepeatingRows(CellRangeAddress rowRangeRef)
voidsetRowGroupCollapsed(int rowIndex, boolean collapse)
group the row It is possible for collapsed to be false and yet still have the rows in question hidden.
voidsetRowSumsBelow(boolean value)
Flag indicating whether summary rows appear below detail in an outline, when applying an outline.
voidsetSelected(boolean value)
Sets a flag indicating whether this sheet is selected.
voidsetZoom(int scale)
Window zoom magnification for current view representing percent values.
voidshiftRows(int startRow, int endRow, int n)
Shifts rows between startRow and endRow n number of rows.
voidshiftRows(int startRow, int endRow, final int n, boolean copyRowHeight, boolean resetOriginalRowHeight)
Shifts rows between startRow and endRow n number of rows.
voidshowInPane(int toprow, int leftcol)
Location of the top left visible cell Location of the top left visible cell in the bottom right pane (when in Left-to-Right mode).
StringtoString()