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

Implement memory efficient XLSX reader in JAVA using poi with XSSF and SAX but didn't know how to get formula?

I am trying to implement .xlsx a reader using POI in java in that my main concern is the memory so I implemented it using XSSF and SAX here is the reference for code which I use Event API (XSSF with SAX) but the formula is one of the main things…
Umesh Sonawane
  • 517
  • 6
  • 17
2
votes
1 answer

How to set cell type as string in Apache POI XSSF 4.10?

I'm trying to set the cell value as String using Apache POI XSSF 4.10 . I have used the code sheet.getRow(i).getCell(k).setCellType(CellType.STRING); but it throws null pointer exception. Please help
Diksha Baluja
  • 81
  • 2
  • 10
2
votes
0 answers

Apache POI : Add images to the header of excel files

I am using Apache POI 4.1 to generate Excel reports. I have a requirement to include logo image as Header event in Sheet. I could find the only below code, which adds text in Header. Is there any way to include image in the Header section of…
shihabudheenk
  • 593
  • 5
  • 18
2
votes
1 answer

Is Event model of POI API not applicable(getting compilation error) in version 3.15?

I have implemented a program where I am trying to read an excel file(.xlsx) using SAX and XSSF(POI API) with the jar version 4.1 where it works alright. But it gives compilation error in POI version 3.15. The code looks some thing like this(which…
DockYard
  • 989
  • 2
  • 12
  • 29
2
votes
1 answer

Unable to write and save XLSM file with Apache POI

I have an existing XLSM file, in which I try to write data with use of Apache POI. String File = GlobalVariables.XLSM; try { Workbook workbook; workbook = new XSSFWorkbook(OPCPackage.open(GlobalVariables.XLSM)); Sheet sheet =…
plaidshirt
  • 5,189
  • 19
  • 91
  • 181
2
votes
1 answer

XSSFWorkbook when written creates a corrupted .xlsx document in Spring Boot application using JDBC

For a project I need to create an .xlsm excel document automatically filling out a template file. Problem is, that the output is corrupted and cannot be read by Excel 365 nor by Apache POI. I have distilled it down to the following minimal example,…
2
votes
0 answers

Read data from excel file column wise how can I change it to row wise

I have written to get in column wise how to get this code into row wise XSSFSheet TcSheet = workbook.getSheet(TestCaseName); int TcRow = TcSheet.getLastRowNum(); int TcCol = TcSheet.getRow(1).getLastCellNum(); data = new Object[TcCol][TcRow +…
2
votes
1 answer

Write to Next Blank row Excel - Java

My code writes data to excel however it is overwriting the same row and columns. I do not want to overwrite the row that has the column titles and the rows after that if it has data in it. Steps 1 enter column heading 2 enter data in rows/columns 3…
Jonathan
  • 395
  • 2
  • 8
  • 25
2
votes
1 answer

Reading and storing excel sheet values using POI (XSSF) - JAVA

Hello I am fairly new to Java programming and was wanting to get some input on my code. I know it is really messy and I have not had a chance to clean it up just yet. I was able to get the JFilechooser to work and as far as I can tell I am setting…
Edward A.
  • 55
  • 6
2
votes
1 answer

Java.lang.NoClassDefFoundError :org/openxmlformats/schemas/spreadsheetml/x2006/main/ctextensionlist in groovy

I am trying to access the existing Excel sheet and trying to create a new sheet and update the sheet with some values,On executing i am getting the below error for line "rowHeader.createCell((short) count…
Naveen.c14
  • 23
  • 1
  • 6
2
votes
3 answers

best possible way of mapping excel fields with java object

I am trying to map an excel field with the java object. What will be the best possible way of doing it rather then being dependent on the column number. Cell orderId=row.getCell(0); System.out.println("orderId" +orderId); Cell…
irfan shafi
  • 524
  • 1
  • 6
  • 21
2
votes
1 answer

dropdown Validation not working if it exceeds 50 rows in the Export To Excel

I am generating Excel File(.xlsx) using apache poi jar (poi-ooxml-3.9.jar), I added dropdown validation for 10 columns in my excel file, If I generate the Excel File with 50 rows, drop down validation is working. If it exceeds more than 50 rows,…
2
votes
3 answers

SXSSF with Excel table

I'm trying to create an Excel table in a streamed workbook (SXSSFWorkbook). It is not supported directly by the API but I've had some success by accessing the underlying XSSFWorkbook (workbook.getXSSFWorkbook). When I open the file in Excel (2007),…
ddx001
  • 2,575
  • 1
  • 17
  • 13
2
votes
0 answers

Append row to large XLSX with low memory footprint using Apache POI

I've been appending rows to existing XLSX workbooks using java and Apache POI. The problem is that I keep running out of memory as the workbooks in question grow, and the -Xmx switch only helps to a point. The actual reading of large workbooks isn't…
Lbm
  • 21
  • 2
2
votes
3 answers

Apache POI generating corrupted excel xlsx file because of standalone or xmlns?

I have a web application (tomcat 8.5.4, java 1.7.0_72) that was previously generating valid xlsx excel files using Apache POI. I'm working on converting the application to manage the jar dependencies with maven and now the file being generated is…
Tim
  • 181
  • 1
  • 8