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

Get all shapes in ShapeGroup

My code basically like this: worksheet.getDrawingPatriarch().getShapes().get(0) This will return the XSSFShapeGroup object, but then from this point I have no idea how to get XSSFSimpleShape or XSSFShape in the group. I want to output the…
Pham Ngoc Vinh
  • 17
  • 2
  • 12
0
votes
1 answer

OutOfMemory or GC Overhead with XSSF

Currently we are using XSSF for exporting records stored in DB to excel and download it. As per our requirement, we need to allow user to download 3 million records. With XSSF, we are facing OutOfMemoryError:GC overhead limit exceeded. I did some…
Bharani
  • 429
  • 1
  • 8
  • 18
0
votes
1 answer

Copy HSSFCellStyle to XSSFCellStyle in NPOI

My input file is .xls from where I have to read data, manipulate and write back to .xlsx file along with the styles. So, using NPOI HSSF to read from .xls and NPOI XSSF to generate the .xlsx file. I am done with the data. But I have to copy the cell…
Sobhan
  • 796
  • 1
  • 9
  • 31
0
votes
0 answers

Unable to create a spredsheet using XSSFWorkbook

Hi here's my code for creating a spreadsheet using XSSFWorkbook: import java.io.File; import java.io.FileOutputStream; import java.util.Map; import java.util.Set; import java.util.TreeMap; import org.apache.poi.ss.usermodel.Cell; import…
khalibali
  • 123
  • 1
  • 2
  • 16
0
votes
1 answer

How do i copy specific column data if header matches using JAVA

I have data in a excel sheet with 10+ columns. I wants to copy particular column data into new sheet or display it on console. i have taken one column name into a variable and checking that with each cell in Headers row if it matches copy that that…
aaa
  • 69
  • 2
  • 14
0
votes
0 answers

XSSFWorkbook Constructor from file getting stuck on import

I recently attempted to rename my project in Eclipse using refactoring, and when I did I ran into many errors. I think I resolved all of them, but now my program is getting stuck while reading in a .xlsx file. File file = new…
tgordon18
  • 1,562
  • 1
  • 19
  • 31
0
votes
0 answers

getcell().setCellValue() gives null pointer exception

I am getting a cell from excel sheet and then I have to set its value. XSSFSheet sheet = workbook.getSheetAt(0); XSSFCell resultCell=null; if( sheet.getRow(1).getCell('A')==null) { sheet.getRow(1).getCell('A').setCellValue("heh");} But this…
puffles
  • 352
  • 2
  • 5
  • 23
0
votes
1 answer

How to identify a cell is blank or null or empty while reading a excel file

I read a excel file to pass the input for some data fields. But when I run the program, some cell values are returning as null, some as blank.Physically when I open the excel file no value is available in the cell. How can I identify manually an…
Ashok kumar Ganesan
  • 1,098
  • 5
  • 20
  • 48
0
votes
1 answer

How to handle null pointer exception while reading xlsx file using Apache POI

I have written below mentioned snippet of code for reading excel file and this is working fine for non empty excel file but for excel file it is throwing NULLPOINTEREXCEPTION. ArrayList dataList = new ArrayList(); XSSFSheet…
AMAN KUMAR
  • 277
  • 1
  • 6
  • 19
0
votes
1 answer

ConditionalFormatting Custom Colors in Apache POI XSSF

I am trying to set a custom color to fill a row using ConditionalFormatting in an XSSF sheet. I've tried SheetConditionalFormatting sheetCF = sheet.getSheetConditionalFormatting(); ConditionalFormattingRule rule1 =…
Mr Awesome8
  • 281
  • 4
  • 10
0
votes
0 answers

WritableWorkbook cannot be resolved to a type even after importing necessary executable JARs

I am trying to create a new excel file using below code. I have added all the necessary JAR files as you can see from import code lines. But I am still seeing the error that "WritableWorkbook cannot be resolved to a type" and "Workbook can not be…
akash bondre
  • 63
  • 1
  • 1
  • 9
0
votes
1 answer

How to convert XSSF color to Java.awt.color format. because XSSF colour could not make a compare

I have posted the code clealy . I want get the color of cell in excel, and i post my excel file and there are only two colors ,green and yellow. if I use XSSFColor ,the print out is XSSFColor@8b21b8fa and XSSFColor@dfcdb1. therefore, and I could…
Song
  • 1
  • 2
0
votes
1 answer

Limitation while generating excel drop down list with Apache POI - can we solve this using xssf rather than hssf?

Limitation While Generating Excel Drop Down with Apache POI This link solves the problem for an HSSFWorkbook. Can we do this for an XSSFWorkbook too ?
abhinav kumar
  • 153
  • 1
  • 9
0
votes
1 answer

Reading excel files .xlsx via Java

So my excel file is relatively small in size. It contains 8 sheets. Each sheet has "records" of data which i need to read. Each sheet also has the first row reserved for headers which i skip; so my data will begin from the 2nd row (1st index) of…
RoRO
  • 48
  • 7
0
votes
1 answer

org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException,root cause nullpointer exception(xmlbeans.jar)

I am trying to read .xlsx file using apache poi3.12, 3.14 is latest and i tried that too.I have included the following…