Questions tagged [xssf]

XSSF provides Java APIs to read / write Microsoft Excel 2007 (OOXML format .xlsx) files. This tag should be used for questions about accessing Excel 2007 files from Java applications. XSSF is managed under the Apache POI Project. Other tag to consider: [tag:apache-poi]

HSSF is the POI Project's pure Java implementation of the Excel '97(-2007) file format. XSSF is the POI Project's pure Java implementation of the Excel 2007 OOXML (.xlsx) file format.

If you are starting with Apache POI, you may find the Busy Developer's link very useful: http://poi.apache.org/spreadsheet/quick-guide.html

Useful links

488 questions
2
votes
0 answers

XSSFWorkbook write method closing output steam implicitly

Hi I'm uploading msexcel 2007 and after evaluation I'm zipping multiple XSSFWorkbooks to a single zip file. On writing my workbook to file it is implicitly closing outputsteam but I want more entries to be created in zip file.On calling method…
Barney
  • 193
  • 1
  • 2
  • 11
2
votes
1 answer

Columns getting hidden in XSSF Apache POI when using autoSizeColumn

I am trying to export a table as xlsx using Apache POI XSSF. The table has 5 columns. First row has title block merging 5 columns. In the second row, 5 headings for the table. Remaining rows are data. I want to set width of the column as max width…
om39a
  • 1,406
  • 4
  • 20
  • 39
2
votes
2 answers

Using custom XSSF Colors in Conditional Formatting?

I had a HSSF workbook with my custom colors in it but now it turns out I need to use XSSF to create xslx files. I have changed everything accordingly but the only thing that has me stumped is how to use a custom made XSSFColor in something like this…
Pod
  • 31
  • 1
  • 7
2
votes
1 answer

How to change font on XSSFTextBox

XSSFTextBox and XSSFRichTextField's Edit see comment; Apache POI seems to be racist, black not supported? Red is? Edit 2 : instead of using XSSFColor use constants in Font, they have Red and Black; looking into default Fonts (Just to be clear code…
Sean Newell
  • 1,033
  • 1
  • 10
  • 25
2
votes
1 answer

POI SS UserModel Performance

When using SS UserModel to parse xls files, whats the difference in performance compared to HSSF?
user1864519
  • 433
  • 4
  • 6
2
votes
2 answers

Adding a XXSF Sheet with POI to an existing excel file is failing on Windows

I need to add a sheet to an existing excel file, but I don't know how to make the file im accessing r/w. I read a large excel sheet and I simplify the data in the sheet I generate. On linux, the program works perfectly, and adds a sheet to the…
Allen
  • 350
  • 2
  • 13
2
votes
2 answers

Jersey @Produces Apache XSSFWorkbook

I am trying to produce a XSSFWorkbook using Jersey. I have tried the following headers and nothing seems to…
AlexIIP
  • 2,461
  • 5
  • 29
  • 44
2
votes
2 answers

java POI XSSF FormulaEvaluator

I am having a problem when i save my new excel file. I want it that when it gets saved the formula calculates itself but at the moment it is just returning a string in the excel file. The formula is correct. I don't know exactly to get the…
The Gav Lad
  • 280
  • 3
  • 9
1
vote
1 answer

Extracting data in spreadsheet columns in Apache POI API

Just want to make sure one thing. Does the Apache POI API have any built-in collection/object, like row and cell, for a column in a spreadsheet? Or do I have to build one myself and add all the cells in the column there to do the sorting etc? Is…
1
vote
1 answer

Apache poi calculating cell address

How to get cell address when cell is null? lets say i have the following excel A B C D 1 x x x x 2 x x x 3 x x x x When I am iterating inside a row over columns something like: for (i in 0 until lastCellNum) { val cell =…
beatrice
  • 3,684
  • 5
  • 22
  • 49
1
vote
1 answer

multiple pivot tables in the same sheet using apache poi

How to create multiple(two) pivot table using apache POI in same sheet of excel. In the below example, i can able to create single pivot table in the sheet. How to add other pivot table dynamically in the same sheet? /* Read the input file that…
1
vote
1 answer

Apache POI - Execution never go beyond instantiation of XSSFWorkbook when trying to read existing xlsx file with no error

EDIT to not make you read everything : Sorry for bothering, I forgot all this was in a try catch clause and I never did anything in the catch part. Moving some code around made me realize this. Because of that I realized that the issue was due to…
RGloum
  • 11
  • 3
1
vote
0 answers

java.lang.NullPointerException at org.apache.poi.xssf.usermodel

In the actual pipeline (locally it works) I am getting an error: [Utils] [ERROR] [Error] java.lang.NullPointerException at org.apache.poi.xssf.usermodel.XSSFWorkbook.getSheet(XSSFWorkbook.java:1112) at utilities.ExcelData See this screenshot for…
1
vote
0 answers

Apache-poi protect sheet locks sheet from autofilter when using Excel O365, but not when using LibreOffice

The issue I am trying to create and populate an Excel sheet while locking specific columns and adding autofilter to the header rows. The application currently generates the Excel sheet with the correct values and when using LibreOffice autofilter…
Zaccie
  • 11
  • 5
1
vote
1 answer

removeRow using XSSF libraries is not working

I tried the below code, but it's not working File src = new File("E:\\TestData.xlsx"); FileInputStream fs = new FileInputStream(src); XSSFWorkbook workbook = new XSSFWorkbook(fs); XSSFSheet sheet = workbook.getSheet("test"); …