Questions tagged [sxssf]

30 questions
25
votes
3 answers

Using Apache POI - Zip Bomb detected

When I am trying to write data to an Excel sheet, using Apache POI which contains more than 64000 records, where SXSSF is used, I am getting the below error: Zip bomb detected! The file would exceed the max. ratio of compressed file size to the…
user3428736
  • 864
  • 2
  • 13
  • 33
11
votes
1 answer

SXSSF: to where does it flush rows not in the window prior to output to file?

According to the SXSSF (Streaming Usermodel API) documentation: SXSSF (package: org.apache.poi.xssf.streaming) is an API-compatible streaming extension of XSSF to be used when very large spreadsheets have to be produced, and heap space is limited.…
John B
  • 32,493
  • 6
  • 77
  • 98
7
votes
2 answers

SXSSF workbook createSheet() fails on linux environments

Was trying to implement an excel export feature on an app using apache POI 3.17. All was working fine on my local tomcat server and on a windows dev environment. However, the SXSSFWorkbook workbook.createSheet() method fails on a linux tomcat server…
shanahobo86
  • 467
  • 2
  • 7
  • 23
6
votes
0 answers

Why does SXSSF workbook (Apache POI) create larger xlsx sizes than Excel?

I developed a Java class to use the SXSSF workbook to overcome the Java Heap error which is always caused by the XSSF workbook when writing very large spreadsheets. See http://poi.apache.org/spreadsheet/how-to.html#sxssf for the solution. In short,…
Trevor
  • 218
  • 3
  • 15
4
votes
1 answer

How to change the Apache POI SXSSFWorkbook default temporary file name

I am using POI's SXSSFWorkbench class to create extremely large workbooks. Multiple processes may be running of my application concurrently, so I thought it prudent to append the processId to the default temporary filename. I don't know how to do…
Mike
  • 676
  • 1
  • 8
  • 17
3
votes
1 answer

SXSSF doesn't support Rich Text Strings, any formatting information will be lost

#When i use SXSSF to write a file,it happend,but i don`t know why.Here is my code:# SXSSFWorkbook workbook = new SXSSFWorkbook() SXSSFSheet currentSheet = workbook.createSheet() SXSSFRow row = sheet.createRow(0); SXSSFCell cell =…
The Wind
  • 31
  • 2
3
votes
1 answer

SXSSF can't create Font and DateFormat

Question In a SXSSF Workbook: How can I set font? How can I set celltype to date? Context I need to write an excel .xlsx file with a huge amount of rows and columns (400.000 rows, 50 fields each) so I'm using apache poi, SXSSF workbook. I created a…
mbianchidev
  • 472
  • 1
  • 7
  • 18
2
votes
0 answers

SXSSF causing Attempting to write a row[23237] in the range [0,23272] that is already written to disk

I am creating an excel sheet of more than 100k rows. I have used SXSSF, since I am handling huge data SXSSFWorkbook workbook = new SXSSFWorkbook( 10000 ); keeping 10 000 rows in cache. But I am getting java.lang.IllegalArgumentException:…
user2699067
  • 33
  • 2
  • 8
1
vote
1 answer

Increasing height merged cells Apache POI

I am using Apache POI SXSSF to generate xlsx document. The document uses Times New Roman sizes 9 and 11, and the default cell width and height have been changed. The question is how to calculate the height of the merged cells so that all the text…
AlexUkhan
  • 23
  • 4
1
vote
2 answers

DotNetCore.NPOI always creates corrupted file

I use DotNetCore.NPOI to export data into *.xlsx file and my program seems to be running out of memory, so I tried to utilize the relatively new SXSSFWorkbook to lower the memory footprint, but the resulting file is always corrupted and can not be…
Kabuto5CZ
  • 303
  • 2
  • 10
1
vote
2 answers

How to read real numeric values instead of formatted value using Apache XSSF POI streaming API?

I use streaming POI API and would like to read the real value of a cell instead of the formatted one. My code which is below works fine but if the user doesn't display all the digit of a value in the excel sheet which is readed by my code, I've got…
0
votes
0 answers

Apache POI SXSSFWorkbook ideal window size

I am trying to produce a large excel (~10 MB) with multiple sheets (5). The current implementation was using XSSFWorkbook but now we are running into OutOfMemoryError in the deployed environment so made the switch to use SXSSFWorkbook. The…
linuxNoob
  • 600
  • 2
  • 14
  • 30
0
votes
0 answers

How to copy conditional formatting from one sheet (XSSF) to another (SXSSF) via apache POI?

XSSFWorkbook existingWorkbook = (XSSFWorkbook) WorkbookFactory.create(new File("c:/test1.xlsx")); XSSFWorkbook brandNewWorkbook = (XSSFWorkbook) WorkbookFactory.create(true); XSSFSheet existingSheet = existingWorkbook.getSheet("Sheet1"); CTWorksheet…
0
votes
0 answers

setDx1 setDy1 not worked in SXSSFWorkbook for JAVA 17

I am getting the image position issue with setting the image for SXSSWorkbook. A similar code is working for XSSFWorkbook. On using setDx1() and setDy1() to give position, the changes are not seen for SXSSFWorkbook. int pictureIdx =…
Anant Doshi
  • 177
  • 1
  • 11
0
votes
0 answers

While using apache poi to read an excel file the thread is getting stuck after parsing the sheets

I am using apache poi for excel read and write. I am able to use it for small size files properly. But now my input file size is >150mb with 200k+ records. Now when the use the same code for reading the file my thread just keeps on stepping and…
1
2