@Named @Dependent public class ExcelStreamingItemWriter extends ExcelUserModelItemWriter
javax.batch.api.chunk.ItemWriter
for Excel 2007 OOXML (.xlsx) file format.
This implementation is currently based on Apache POI SXSSF (buffered streaming) API, and is suitable for handling
large data set. Note that different versions of Excel have different limits for row number and column numbers.
As of Excel 2010, the row number limit is 1048576. For more details, see
http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010342495.aspxExcelUserModelItemWriter
,
ExcelItemReaderWriterBase
Modifier and Type | Field and Description |
---|---|
protected Boolean |
compressTempFiles
Whether to compress the temp files in the course of generating Excel file, defaults to false.
|
outputStream, templateHeaderRow, templateResource, templateSheetIndex, templateSheetName, writeMode
beanType, currentRowNum, header, sheet, sheetName, workbook
customDataTypeModules, customDeserializers, customSerializers, deserializationFeatures, jsonFactory, jsonFactoryFeatures, jsonFactoryLookup, mapperFeatures, objectMapper, serializationFeatures
NEW_LINE, resource, skipBeanValidation
Constructor and Description |
---|
ExcelStreamingItemWriter() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.poi.ss.usermodel.Workbook |
createWorkbook(InputStream templateInputStream)
Creates the workbook for this writer.
|
checkpointInfo, close, createCell, open, writeItems
getCellStringValues
initJsonFactory, initJsonFactoryAndObjectMapper, registerModule
getInputStream, getOutputStream, getValidator, validate
@Inject protected Boolean compressTempFiles
protected org.apache.poi.ss.usermodel.Workbook createWorkbook(InputStream templateInputStream) throws IOException, org.apache.poi.openxml4j.exceptions.InvalidFormatException
ExcelUserModelItemWriter
createWorkbook
in class ExcelUserModelItemWriter
templateInputStream
- java.io.InputStream for the template excel file, if anyIOException
org.apache.poi.openxml4j.exceptions.InvalidFormatException
Copyright © 2018 JBoss by Red Hat. All rights reserved.