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

Reading XSSF workbook (.xlsx) crashes Android app

Issue: I am trying to read an XLSX file for input values. The code works for XLS but app crashes for XLSX files. But the implementation of HSSF and XSSF seems to be more or less same. Below is the error logged. So Far: Tried many SO answers.…
Gladiator
  • 169
  • 1
  • 2
  • 12
3
votes
0 answers

How can I set only the plot area height in XSSFChart using Apache POI 4.1.2

I have created a stacked bar chart using a template file. In my chart, there is one series and more than 100 legends. To show all legends I have adjusted the plot area Y-axis value, now the bar size bigger than expected. Are there any methods to…
jyothis
  • 41
  • 5
3
votes
1 answer

Updating existing Excel file in Java Apache POI without using InputStream

I am trying to update an existing Excel file (xlsx). Constructors like XSSFWorkbook(java.io.File file) and XSSFWorkbook(OPCPackage pkg) open the file in a read only mode and don't allow modifications. So I have to use…
Gaurav
  • 398
  • 8
  • 23
3
votes
1 answer

Renaming headers of XSSFTable with Apache Poi leads to corrupt XLSX-file

I am trying to rename headers of an existing xlsx-file. The idea is to have an excel-file to export data from XML to excel and reimport the XML once some user has made adjustments. At the moment we have created a "template" xlsx-sheet with Excel…
3
votes
0 answers

Problems when converting XSSFWorkbook to SXSSFWorkbook APACHE POI

I'm triying to convert a xssfWorkbook file to a SXSSF because I'm generating a big report, but the problem is that I cannot convert, what I'm currently trying is this example. public void export(Workbook hssfWorkbook, Map model)…
Ivan Cuellar
  • 31
  • 1
  • 2
3
votes
1 answer

cannot find symbol Workbook.close()

I saw multiple questions with this header but didn't get my answer. private void createHandBackFile(XSSFSheet sheet, String programId, XSSFWorkbook workbook) throws IOException { String output =…
Muddassir Rahman
  • 976
  • 1
  • 9
  • 20
3
votes
0 answers

How to read the colSpan and rowSpan of an Excel cell with POI

Apache POI is a powerfull library but I can't find out how to read the colspan or rowspan of a cell. I expected that the XSSF cell would have methods like getColSpan() but I just can't find the right hint - even google is not my friend in this…
rdmueller
  • 10,742
  • 10
  • 69
  • 126
3
votes
2 answers

Not able to set custom color in XSSFCell Apache POI

I am trying to set some custom(from hexcode or rgb value) color to a xssfcell.But the color of the cell is becoming black even though I am giving some other color.I have tried doing this by the following ways : File xlSheet = new…
NitSher01
  • 117
  • 1
  • 8
3
votes
1 answer

java.lang.NoClassDefFoundError, but all jar files are in place

SOLVED, I GOT IT TO WORK I just completed my first real JAVA program. It is a program which lets you open a .xlsx file and the program extracts data from this file and shows this in a textArea. In eclipse, the program works totally fine, but the…
Diederik
  • 41
  • 3
3
votes
0 answers

Java Apache POI evaluateInCell does not work

I want to disable all formulas on my excel sheet. I wrote this code as a test for only one cell. Although everything seen fine, my B3 cell remains as formula cell. I searched a lot but did not find solution. What is problem of my code or what you…
3
votes
1 answer

POI-XSSF: user defined data formats

I am reading an excel , which seems to have user defined data formats. for example it has a data format : "yyyy"E , which just displays the date in yyyy format followed by the letter E. Now, this format is not a part of the built in ,available…
gaurav5430
  • 12,934
  • 6
  • 54
  • 111
3
votes
0 answers

how to filter report filter in pivot table of xlsx using Apache poi?

Image link I am using apache poi to create pivot table in excel as below : FileInputStream fis = new FileInputStream(new File("Input/Book2.xlsx")); XSSFWorkbook workbook = new XSSFWorkbook(fis); XSSFSheet spreadsheet =…
Sowmya
  • 453
  • 1
  • 5
  • 18
3
votes
1 answer

NPOI: how to use custom XSSFColor in conditional formatting?

What I have: var sheetCf = sheet.SheetConditionalFormatting; var rule = sheetCf.CreateConditionalFormattingRule("A2>0"); var fill = rule.CreatePatternFormatting(); fill.FillBackgroundColor = IndexedColors.Red.Index; fill.FillPattern =…
3
votes
3 answers

setCellType(HSSFCELL.CELL_TYPE_NUMERIC) is not working in apache poi

SetCellType(HSSFCELL.CELL_TYPE_NUMERIC) is not working in apache poi. Anyone have used this feature of POI in JAVA? When I created XLS file using POI and cell contains integer value and I set cell type as numeric at that time that cell reflects…
Nishith Shah
  • 81
  • 1
  • 2
  • 8
3
votes
1 answer

To process more than 65536 rows xslx using POI

I need to upload xslx file having more than 65536 lines with 25 columns in a single sheet and write in to DB table. I use XSSF Reader event handler API and OPCpacakage classes for both upload and read. When a file contains 65536 rows or less it…
ms_guruvai
  • 31
  • 1
  • 2