Package org.apache.poi.xssf.streaming
Class DeferredSXSSFWorkbook
java.lang.Object
org.apache.poi.xssf.streaming.SXSSFWorkbook
org.apache.poi.xssf.streaming.DeferredSXSSFWorkbook
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<Sheet>,Workbook
An variant of SXSSFWorkbook that avoids generating a temporary file and writes data directly to
the provided OutputStream.
This variant is experimental and APIs may change at short notice.
- Since:
- 5.0.0
-
Field Summary
Fields inherited from class org.apache.poi.xssf.streaming.SXSSFWorkbook
DEFAULT_WINDOW_SIZEFields inherited from interface org.apache.poi.ss.usermodel.Workbook
MAX_SENSITIVE_SHEET_NAME_LEN, PICTURE_TYPE_DIB, PICTURE_TYPE_EMF, PICTURE_TYPE_JPEG, PICTURE_TYPE_PICT, PICTURE_TYPE_PNG, PICTURE_TYPE_WMF -
Constructor Summary
ConstructorsConstructorDescriptionDeferredSXSSFWorkbook(int rowAccessWindowSize) DeferredSXSSFWorkbook(XSSFWorkbook workbook) DeferredSXSSFWorkbook(XSSFWorkbook workbook, int rowAccessWindowSize) -
Method Summary
Modifier and TypeMethodDescriptionCreate a Sheet for this Workbook, adds it to the sheets and returns the high level representation.createSheet(String sheetname) Create a Sheet for this Workbook, adds it to the sheets and returns the high level representation.getStreamingSheet(String name) Gets sheet with the given name for streaming.getStreamingSheetAt(int index) Gets the sheet at the given index for streaming.getXSSFSheet(String name) voidremoveSheetAt(int index) Removes sheet at the given indexReturns an iterator of the sheets in the workbook in sheet order.Methods inherited from class org.apache.poi.xssf.streaming.SXSSFWorkbook
addOlePackage, addPicture, addToolPack, cloneSheet, close, createCellStyle, createDataFormat, createEvaluationWorkbook, createFont, createName, dispose, findFont, getActiveSheetIndex, getAllNames, getAllPictures, getCellReferenceType, getCellStyleAt, getCreationHelper, getFirstVisibleTab, getFontAt, getForceFormulaRecalculation, getMissingCellPolicy, getName, getNames, getNumberOfFonts, getNumberOfFontsAsInt, getNumberOfNames, getNumberOfSheets, getNumCellStyles, getPrintArea, getRandomAccessWindowSize, getSheet, getSheetAt, getSheetIndex, getSheetIndex, getSheetName, getSheetVisibility, getSpreadsheetVersion, getXSSFWorkbook, isCompressTempFiles, isHidden, isSheetHidden, isSheetVeryHidden, linkExternalWorkbook, removeName, removePrintArea, setActiveSheet, setCellReferenceType, setCompressTempFiles, setFirstVisibleTab, setForceFormulaRecalculation, setHidden, setMissingCellPolicy, setPrintArea, setPrintArea, setSelectedTab, setSheetHidden, setSheetName, setSheetOrder, setSheetVisibility, setShouldCalculateSheetDimensions, setZip64Mode, shouldCalculateSheetDimensions, spliterator, write, writeAvoidingTempFiles
-
Constructor Details
-
DeferredSXSSFWorkbook
public DeferredSXSSFWorkbook() -
DeferredSXSSFWorkbook
public DeferredSXSSFWorkbook(int rowAccessWindowSize) -
DeferredSXSSFWorkbook
-
DeferredSXSSFWorkbook
-
-
Method Details
-
createSheet
Description copied from class:SXSSFWorkbookCreate a Sheet for this Workbook, adds it to the sheets and returns the high level representation. Use this to create new sheets.- Specified by:
createSheetin interfaceWorkbook- Overrides:
createSheetin classSXSSFWorkbook- Returns:
- Sheet representing the new sheet.
-
createSheet
Description copied from class:SXSSFWorkbookCreate a Sheet for this Workbook, adds it to the sheets and returns the high level representation. Use this to create new sheets.- Specified by:
createSheetin interfaceWorkbook- Overrides:
createSheetin classSXSSFWorkbook- Parameters:
sheetname- sheetname to set for the sheet.- Returns:
- Sheet representing the new sheet.
- See Also:
-
sheetIterator
Returns an iterator of the sheets in the workbook in sheet order. Includes hidden and very hidden sheets.- Specified by:
sheetIteratorin interfaceWorkbook- Overrides:
sheetIteratorin classSXSSFWorkbook- Returns:
- an iterator of the sheets.
-
getStreamingSheetAt
Gets the sheet at the given index for streaming.- Parameters:
index- the index- Returns:
- the streaming sheet at
-
getXSSFSheet
-
getStreamingSheet
Gets sheet with the given name for streaming.- Parameters:
name- the name- Returns:
- the streaming sheet
-
removeSheetAt
public void removeSheetAt(int index) Removes sheet at the given index- Specified by:
removeSheetAtin interfaceWorkbook- Overrides:
removeSheetAtin classSXSSFWorkbook- Parameters:
index- of the sheet to remove (0-based)
-