XSSFWorkbook
High level representation of a SpreadsheetML workbook. This is the first object most users will construct whether they are reading or writing a workbook. It is also the top level object for creating new sheets/etc.
Class Properties
Class Hierarchy
Click to view full-sized image
Nested Classes
Click to view full-sized image
Class Statistics
  • Nested Classes: 1
  • Constructors: 6
  • Fields: 25
  • Methods: 123
Constructor Summary
VisibilityNameParametersDeprecatedExternal UseCFGCallDFG
publicXSSFWorkbookXSSFWorkbookType workbookTypeShowShowShow
Create a new SpreadsheetML workbook.
publicXSSFWorkbookInputStream isShowShowShow
Constructs a XSSFWorkbook object, by buffering the whole stream into memory and then opening an {@link OPCPackage} object for it.

Using an {@link InputStream} requires more memory than using a File, so if a {@link File} is available then you should instead do something like


       OPCPackage pkg = OPCPackage.open(path);
       XSSFWorkbook wb = new XSSFWorkbook(pkg);
       // work with the wb object
       ......
       pkg.close(); // gracefully closes the underlying zip file
   
publicXSSFWorkbookFile fileShowShowShow
Constructs a XSSFWorkbook object from a given file.

Once you have finished working with the Workbook, you should close the package by calling {@link #close()}, to avoid leaving file handles open.

Opening a XSSFWorkbook from a file has a lower memory footprint than opening from an InputStream

publicXSSFWorkbookString pathShowShowShow
Constructs a XSSFWorkbook object given a file name.

Once you have finished working with the Workbook, you should close the package by calling {@link #close()}, to avoid leaving file handles open.

Opening a XSSFWorkbook from a file has a lower memory footprint than opening from an InputStream

publicXSSFWorkbookShowShowShow
Create a new SpreadsheetML workbook.
publicXSSFWorkbookOPCPackage pkgShowShowShow
Constructs a XSSFWorkbook object given a OpenXML4J Package object, see http://poi.apache.org/oxml4j/.

Once you have finished working with the Workbook, you should close the package by calling either {@link #close()} or {@link OPCPackage#close()}, to avoid leaving file handles open.

Creating a XSSFWorkbook from a file-backed OPC Package has a lower memory footprint than an InputStream backed one.

Showing 1 to 6 of 6 entries
Field Summary
VisibilityTypeNameStaticInstanceFinalDeprecatedExternal UseDFG
privatePOILoggerloggerShow
privateListValuedMapnamedRangesByNameShow
this holds the XSSFName objects attached to this workbook, keyed by lower-case name
privateListnamedRangesShow
this holds the XSSFName objects attached to this workbook
privateSharedStringsTablesharedStringSourceShow
shared string table - a cache of strings in this workbook
privateXSSFDataFormatformatterShow
Used to keep track of the data formatter so that all createDataFormatter calls return the same one for a given book. This ensures that updates from one places is visible someplace else.
privateListpivotTablesShow
List of all pivot tables in workbook
privatePatternCOMMA_PATTERNShow
privateintMAX_SENSITIVE_SHEET_NAME_LENShow
Excel silently truncates long sheet names to 31 chars. This constant is used to ensure uniqueness in the first 31 chars
privateCTWorkbookworkbookShow
The underlying XML bean
privateListsheetsShow
this holds the XSSFSheet objects attached to this workbook
Showing 1 to 10 of 25 entries
Method Summary
VisibilityReturnNameParametersStaticInstanceConcreteDeprecatedExternal UseCFGCallDFG
privatevoidvalidateSheetIndexint indexShowShowShow
Validate sheet index
privatevoidaddRelationRelationPart rp
POIXMLDocumentPart target
ShowShowShow
privateStringgetUniqueSheetNameString srcNameShowShowShow
Generate a valid sheet name based on the existing one. Used when cloning sheets.
privatebooleanworkbookProtectionPresentShowShowShow
privateCTWorkbookProtectionsafeGetWorkbookProtectionShowShowShow
privateXSSFNamecreateAndStoreNameCTDefinedName ctNameShowShowShow
privatevoidupdateNamedRangesAfterSheetReorderint oldIndex
int newIndex
ShowShowShow
update sheet-scoped named ranges in this workbook after changing the sheet order of a sheet at oldIndex to newIndex. Sheets between these indices will move left or right by 1.
privatevoidupdateActiveSheetAfterSheetReorderint oldIndex
int newIndex
ShowShowShow
privatevoidvalidateSheetNameString sheetNameShowShowShow
privatevoidsaveNamedRangesShowShowShow
marshal named ranges from the {@link #namedRanges} collection to the underlying CTWorkbook bean
Showing 1 to 10 of 123 entries
Issue Summary
Issue IdLast ChangedSummaryStatusSeverityPriorityRelated CommitsView Report
450182008-05-28 08:44:09[PATCH] Patch to fetch embedded documents from OOXML filesRESOLVEDnormalP2Show
454312016-03-31 06:08:43XSSFWorkbook cannot save a macro-enabled Excel (.xlsm)RESOLVEDnormalP2Show
454922008-09-21 11:57:37HSSFCellStyle.getFillBackgroundColor() does always return 64RESOLVEDnormalP20c6a27425Show
458812008-09-24 10:57:11Fix some examplesRESOLVEDnormalP2Show
458942008-09-25 23:03:03patch XSSFWorkbookRESOLVEDnormalP2Show
458992008-09-28 22:33:05patch for XSSFWorkbookRESOLVEDnormalP2Show
459172008-11-05 20:11:03Documentation XSSFFontRESOLVEDnormalP2Show
459202008-11-05 20:20:09Implement XSSFSheet.getDisplayGuts and XSSFSheet.setDisplayGutsRESOLVEDnormalP2Show
459742008-10-21 10:57:07POI 3.5b3: XSSFCell.getCellStyle can return nullRESOLVEDnormalP2Show
460032008-10-17 11:45:42Implemented XSSFWorkbook.setPrintArea()RESOLVEDnormalP2Show
Showing 1 to 10 of 109 entries
Revision Control Summary
Commit IdCommiterDate/TimeSummaryRelated IssuesView Commit
0e44d8da7Nick Burch2014-08-01Fix bug #56800 - Provide a helpful exception, XLSBUnsupportedException, if XSSFWorkbook is passed a .xlsb file56800Show
0f1f7d1d4Yegor Kozlov2009-07-24fixed compatibility issues with OpenOffice 3.0 and Excel 2008 Mac sp2, see Bugzilla #46419 and #4755947559, 46419Show
0f86c22aeYegor Kozlov2010-12-02Avoid crashing Excel when sorting XSSFSheet autofilter, see Bugzilla 5031550315Show
0fdd7a1dbNick Burch2014-11-04Partial HSSF support for adding new external workbook formula references for #5718457184Show
0fdfac62cDominik Stadler2014-12-22Bug 57171 and 57163: Adjust the active sheet in setSheetOrder() and removeSheet() for both HSSF and XSSF57171, 57163Show
141294063Yegor Kozlov2012-10-04Bugzilla 53950 - fixed setForceFormulaRecalculation to reset workbook-level manual flag<53950Show
141dc22e8Yegor Kozlov2009-09-16improved work with user-defined functions, see Bugzilla 4780947809Show
15be6fb33Javen O'Neal2017-01-20bug 60605: convert Workbook.SHEET_STATE_* to SheetVisibility enum60605Show
19a6ad2abYegor Kozlov2011-06-27Bug 51422 - Support using RecalcIdRecord to trigger a full formula recalculation on load51422Show
1b19410d6Yegor Kozlov2011-12-07Bugzilla 52268 - support cloning sheets with drawings in XSSF52268Show
Showing 1 to 10 of 71 entries