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
5
votes
1 answer

Java Apache POI - XSSFCell setFillBackgroundColor Has No Effect

I have looked all over stack overflow and could not seem to get my java code to fill the background color of an XSSF excel cell. From what others have said, this should make the top left corner cell yellow: // Example Code try { // prepare …
Ibrahim
  • 1,209
  • 1
  • 11
  • 16
5
votes
2 answers

java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller

I am trying to generate Excel using Xssf API because its memory footprint is small. It is working fine in my local machine which is having jdk1.7. But when I try to run it on UNIX where java version is 1.6.0_75 it gives me the following…
Rizwan Shaikh
  • 101
  • 1
  • 1
  • 5
5
votes
1 answer

Set a specific cell width to column in XSSF Apache POI

I am trying to export a table as xlsx using Apache POI XSSF. 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 of…
om39a
  • 1,406
  • 4
  • 20
  • 39
4
votes
2 answers

Apache POI - XSSF: Row.getCell()

I am using XSSF to access the .xlsx format. Extracting row data and cell data is being done by Row.getCell(1) // to get the first cell data. Is there a way to access cells like Row.getCell(A) or Row.getCell(AC). This will be very helpfull for…
naamadheya
  • 1,902
  • 5
  • 21
  • 28
4
votes
1 answer

How Can I Enable Sorting/Filtering on XSSFTable Columns Using Apache POI?

I'm working on an application that fetches database records and creates an excel doc from that data. The excel doc is generated fine and all the data is readable; as of a previous answer from this forum the table is also appropriately generated (the…
Wickerbough
  • 365
  • 1
  • 4
  • 15
4
votes
3 answers

Recalculating formulas in spreadsheet using Apache POI

I'm trying to use POI XSSF to evaluate some Excel formulas. The values do not have to be saved, and I may have to calculate many formulas, so I'm trying to do it all in the same cell. The problem is that the cell value seems to get stuck on the…
qwerty
  • 515
  • 1
  • 9
  • 14
4
votes
1 answer

Creating xlsx file using XSSFWorkbook, but getting error while using method createSheet("String")

I have tried to include all the jars needed in Referenced Libraries. There are similar questions on this forum, I have gone through all but unable to resolve the issue. My Code Snippet: Workbook workbook = new XSSFWorkbook(); CreationHelper…
Akshay Tenkale
  • 151
  • 3
  • 10
4
votes
1 answer

Apache POI select values from drop down menu

I got a template Excel-file in my application, which i use to report information depending on the selected values. Now the template has got values as a drop down menu in different cells as you can see . I want to select the values by index from the…
Lycone
  • 650
  • 9
  • 18
4
votes
2 answers

POI-XSSF: read formatted value from formula cells cached value

In my excel sheet many cells contain formulas, i don't want to recalculate these formulas when i read the excel with Apache POI. The way i do that: if(cell.getCellType() == XSSFCell.CELL_TYPE_FORMULA) { //System.out.println("Formula is " +…
gaurav5430
  • 12,934
  • 6
  • 54
  • 111
4
votes
4 answers

How to get rid of "Save changes?" prompt on xlsx-files created with Apache POI XSSF

After opening and immediately closing an xlsx-file, created with Apache POI XSSF, I get prompted to save unsaved changes. As far as i can tell, this is happening because I am using formulas within the xlsx-file. According to the javadoc, this should…
sobrino
  • 153
  • 12
4
votes
1 answer

[apache poi xssf]:creating pivot table in new sheet(Java)

I've modified the basic example to create a pivot table in a new worksheet. But upon opening the new xlsx file, I get an error (Excel found unreadable content in...followed by: Removed Part: /xl/pivotTables/pivotTable1.xml part with XML error. …
labheshr
  • 2,858
  • 5
  • 23
  • 34
4
votes
4 answers

NoClassDefFoundError: UnsupportedFileFormatException while working with excel sheet using java

I'm writing a Java program which reads from a .xlsx file and give the output in .csv format. This is my code: import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import…
Gaurav Mahawar
  • 412
  • 3
  • 5
  • 14
4
votes
1 answer

how to get font color of a XSSF CELLSTYLE?

I am trying to get font color of cell of a XLSX file. I am using the apache poi. I am able to get the cell color but not the font color. Any kind of suggestion will be appreciated. thanks
user3284156
  • 43
  • 1
  • 3
4
votes
1 answer

Excel Cell Format - XSSF Workbook

This is my code so far, it gets data from a query then exports it into an Excel document: oArray = CreateObject("java", "java.util.Arrays"); workbook = CreateObject("java", "org.apache.poi.xssf.usermodel.XSSFWorkbook"); …
Alias
  • 415
  • 1
  • 6
  • 20
3
votes
3 answers

POI Creates XLSX files incompletely or wrongly(the dimension tag in the XLSX XML reads only A1 after creation instead of A1:500Z)

I write XLSX files through the apache POI library..(I have tried it by using POI 3.8 beta1 to beta 4). When i try to open the XLSX files through Excel 2007 it gives me an error that the sheet has unreadable content, and then excel asks me to whether…
rirhs
  • 297
  • 2
  • 4
  • 9