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

What are the possible values for startElement function in DefaultHandler class

I have been trying to use XSSF and SAX event API as it is mentioned in here to read a large excel file. They have used several key words as c, r, t, s when calling getValue() function as it is shown in below code. if(name.equals("c")) { …
udani
  • 1,243
  • 2
  • 11
  • 33
0
votes
1 answer

How to resize POI XSSFChart

So i get chart from excel file (.xlsx) by this code. XSSFSheet sheet = workbook.getSheetAt(10); XSSFDrawing drawing = sheet.createDrawingPatriarch(); XSSFChart chart = drawing.getCharts().get(0); and i need to resize this chart…
podebwm
  • 5
  • 2
0
votes
0 answers

Can you set the sheet name width using XSSFworkbook?

I am working with XSSFWorkbook and I was wonder if there is a way to set the width of the sheet name field. The name being placed in the sheet name is 32 characters long. The app use to use HSSFWorkbook which would cut off the last character to…
Joe
  • 743
  • 5
  • 10
  • 26
0
votes
1 answer

Apache POI in Windows Server 2012 R2

We have a set of utility programs which reads an .xlsx file for some input data and generate reports, Apache POI is used for this purpose. Excel file got 8 sheets with an average of 50 rows and 20 columns of data. Everything was working fine in…
Rajeev
  • 339
  • 2
  • 12
0
votes
1 answer

How to change only one style property in xssf by keeping all the other properties same

How to change only font color of one cell without altering the workbooks previous style properties. Please look at the attachment "workbook" for clear understanding. The column delta contribution font color should be changed but its background style…
0
votes
1 answer

autoSizeColumn() fails for XSSFSheet

I've copied the loop used and working to autosize columns in HSSFSheet, but for XSSFSheet the cell that is using to adjust the column is not the one wider. This results in columns with "0" width. XSSFSheet xssfSheet = null; ..... for (short c = 0;…
Sanjo
  • 78
  • 8
0
votes
0 answers

I am trying to pass parameters from excel sheet to my website signup page, all fields working fine except mobile number field

I am trying to pass parameters from excel sheet to my website signup page, all fields working fine except mobile number field. Its reading as 1.234567890 but my actual data is 1234567890. How can i solve this problem? Here is my code: public class…
Krishna
  • 21
  • 1
  • 6
0
votes
0 answers

Apache Workbook XSSF gets wrong format of cell value

I'm created an excel(xlsx) file with data. Map> dataXlsx = new HashMap<>(); Workbook workBook = new WorkBook(); final XSSFFont blackFont = (XSSFFont) workBook.createFont(); blackFont.setFontHeightInPoints((short) 11); …
Dron4K
  • 456
  • 2
  • 6
  • 20
0
votes
1 answer

Excel File uploading Using Java

I uploaded the excel file in mysql 5.7.The details are uploaded smoothly except time.I dont know how to get time value from excel sheet. Issue: **java.lang.IllegalStateException: Cannot get a text value from a numeric…
Kanika
  • 31
  • 2
  • 12
0
votes
2 answers

Read a Color from a Blank Cell in Excel to Java using Apache POI

BACKGROUND: I am trying to read an Excel file into a Java Program. My Excel file is meant to represent a grid or raster map, so I made the height and width of each cell one inch. The idea is that I can "draw" a map or image by shading in each cell…
Luke1195
  • 23
  • 5
0
votes
2 answers

"Zip bomb detected" exception thrown by Apache-POI while opening existing xlsx files with pivot tables

I am trying to open existing xlsx file (Ms-excel 2010) to append with more data using Apache-POI (v 3.15). The existing xlsx file (size 700Kb) contains number of tabs with pivot tables, charts etc. File file = new File(FILE_PATH); OPCPackage…
sachinsd
  • 51
  • 3
  • 10
0
votes
1 answer

XSSFCell.CELL_TYPE_NUMERIC changes Value 0 to 25

integrityrecords.get(i).get(2)="0"; fieldsheet.getRow(1).getCell(3) .setCellValue(integrityrecords.get(i).get(2)); System.out.println("coulmn 1 :" + integrityrecords.get(i).get(2)); I am trying get data from Database as an…
Vinmee
  • 23
  • 2
  • 8
0
votes
1 answer

Error When trying to use XSSF on Jmeter

I am getting error when trying to create xlsx file using Jmeter. actually I already try using HSSF (for .xls) and it is works fine. But when I am trying to change it using xlsx, I am getting error. I already copy the jar file for poi and poi-ooxml…
Hendrione
  • 225
  • 1
  • 5
  • 18
0
votes
0 answers

xlsx excel generation - never seen this before

Need your help here... I've recently worked on generation of an excel document based on xls or xlsx option. Earlier it was xls by default. However i've been the facing the below error w.r.to generating excel worksheet in xlsx format. Caused by:…
gagan
  • 1
  • 1
0
votes
0 answers

workbook.getTheme().getThemeColor(bgColor.getIndex()) is returning null/wrong color references

I solved it with an ugly workaround: Does somebody else know a better solution? public static BaseColor getIndexedColor(XSSFWorkbook wb, short idx) { byte[] rgb =…