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

java - XSSF. NullPointerException

I am getting NullPointerException for following code. Could some one please help on this? I am trying to get database values to existing excel sheet. Statement statement = connect.createStatement(); ResultSet resultSet =…
0
votes
1 answer

Evaluate all formulas in a Workbook object

I want to evaluate all formulas in a Workbook object. I know there are XSSFFormulaEvaluator and HSSFFormulaEvaluator for evaluating formulas in XSSFWorkbook and HSSFWorkbook. But the workbook object I have belongs to Workbook class. I can use…
vaibhavvc1092
  • 3,067
  • 4
  • 19
  • 26
0
votes
0 answers

Error loading Excel file with images in POI

Writing an android app that uses excel files and ran into a bump in the road. It loads files without pictures just fine, but the moment I try to load an excel file that has pictures embedded in it, I get this errror: 01-16 14:50:37.927…
Nuvious
  • 1,469
  • 2
  • 12
  • 21
0
votes
0 answers

Exit from reading file with apache poi xssf

I'm using apache poi xssf to read excel files and I need to stop the reading when I find a row without field "date" (from the third row I have for each row a field date and if it is empty I have to stop with the file reading). So I have this class…
luca
  • 3,248
  • 10
  • 66
  • 145
0
votes
1 answer

Start reading an Excel sheet at a specified row

I am reading an Excel file using POI's XSSF and SAX (Event API). The Excel sheet has thousands of rows so this is the only way that I have found to have good performance. Now I would like to read Excel file from one particularly row, for example row…
luca
  • 3,248
  • 10
  • 66
  • 145
0
votes
1 answer

Excel File can't be accessed by Java-Program if Excel-file is open

My code is supposed to print a number (in this case the number 5) to a specified cell in a specified Excel Workbook. The code works if the Excel-Workbook is closed. However, if the Excel-Workbook is open, I get the following error message when…
steady_progress
  • 3,311
  • 10
  • 31
  • 62
0
votes
1 answer

How to get simple info about XSSFChart?

I want to get info like x, y, width, height, title of the chart. Here is my version for HSSFChart which works (It returns non-zero values): HSSFChart chart title = chart.getChartTitle(); x = chart.getChartX(); y = chart.getChartY(); width =…
0
votes
1 answer

Copy a XSSF/HSSF-Cells into a new XSSFWorkbook

My problem I need to exactly copy cells from XSSFWorkbooks and HSSFWorkbooks to a new XSSFWorkbook. So my cells can be of both types: XSSFCell and HSSFCell. By exactly, I mean that I also need to copy the CellStyle including the CellBorder and…
winklerrr
  • 13,026
  • 8
  • 71
  • 88
0
votes
0 answers

How to remove extLst from Theme elements in ApachePOI XSSFWorkbook?

I need to create theme elements without extLst for XSSFWorkbook. I don't want xml entry or . ApachePOI creates first of them when extLst is empty and the second one when I call CTBaseStyles.addNewExtLst(). I…
Piotr
  • 23
  • 3
0
votes
1 answer

Excel generation, unreadable content

I'm using Apache POI 3.12 (SXSSF workbook) in order to generate .xlsx files. The problem is that I'm doing the generation and when I open the file I'm receiving an error message: Excel found unreadable content in file.xlsx. Do you want to recover …
Alkis Kalogeris
  • 17,044
  • 15
  • 59
  • 113
0
votes
1 answer

How to interrupt POI streaming reader after reading the first line?

I need to find a way to interrupt the stream reader (reading XML and parsing it with SAX) after first line. Meaning after I read the column names. Any idea how to do that? CODE: XSSFSheetXMLHandler.SheetContentsHandler mySheetContentsHandler =…
Ondrej Tokar
  • 4,898
  • 8
  • 53
  • 103
0
votes
2 answers

java excel read one column

I have a column (B) that I need to take all the values between B3 and B20 this is my code try { OPCPackage fs; fs = OPCPackage.open(new File(getFilePath())); XSSFWorkbook wb = new XSSFWorkbook(fs); …
Marco Dinatsoli
  • 10,322
  • 37
  • 139
  • 253
0
votes
1 answer

Trying to add hyperlink to excel cell but result is filepath

I'm trying to add a hyperlink to excel cell using java as follows. XSSFCreationHelper helper= xssfWorkbook.getCreationHelper(); XSSFHyperlink url_link=helper.createHyperlink(Hyperlink.LINK_URL); cell.setCellValue("some…
Channa
  • 3,267
  • 7
  • 41
  • 67
0
votes
1 answer

How to get chart info from excel 2007 using POI?

I've been trying to get chart info from excel 2007 using POI. plotArea.getScatterChartList().size(); This method keeps returning 0. Here is my code: XSSFDrawing drawing = sheet.createDrawingPatriarch(); List chartsList =…
0
votes
1 answer

How to get conditional formatting info from excel 2007?

I have to compare two different excel files and I keep getting 0 or null values from XSSFConditionalFormattingRule methods while HSSFConditionalFormattingRule methods are working fine. Here is the result from .xls and .xlsx file (both have the same…