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

Java- Apache POI XSSF - Custom RGB Cellbackground not working

I want to use a custom RGB color (38,38,38) for my cell backgroundcolor. For that I use this code: IndexedColorMap colorMap = wb.getStylesSource().getIndexedColors(); XSSFColor customtablegrey = new XSSFColor(new java.awt.Color(38,38,38),…
Muddyblack k
  • 314
  • 3
  • 16
1
vote
0 answers

"java.lang.NoSuchFielErorr: Factory" when trying to create a new XSSFWorkbook()

I am trying to export some excel file and I need that row limit that XSSF has over HSSF and the code gets stuck when a new XSSFWorkbook is being initalized. List of dependecies I have : poi-5.1.0 poi-ooxml-5.1.0 also the other poi…
1
vote
1 answer

Add a formula to Excel cell using Apache POI XSSF workbook

I must add formulas to an Excel worksheet and I found out this is done in the following way: String strFormula= "SUM(A1:A10)"; cell.setCellType(HSSFCell.CELL_TYPE_FORMULA); cell.setCellFormula(strFormula); My questions are: It may happen that the…
1
vote
1 answer

Can Apache POI apply Top 10 conditional formatting?

I have already created the excel files already has such as createConditionalFormattingRule With defrent kind like if the cell value EQUAL to another one : XSSFConditionalFormattingRule my_rule1 =…
Adeeb Mark
  • 67
  • 7
1
vote
1 answer

Getting font size from excel spreadsheet using Java

I'm trying to get the font size of the header on an excel spreadsheet but I haven't been able to get it. I tried using the following to get the size but I haven't been able to get the size. None of the following worked for me because it doesn't…
Eddie Ed
  • 13
  • 2
1
vote
3 answers

Cloning sheets between files

I have three or more excel files with different sheets among them and I need to create a new blank file with a copy (or clone) that sheets into the new file and place them in the order I need so I can fill out the respective forms with data. How can…
RickMx
  • 1,519
  • 2
  • 10
  • 4
1
vote
0 answers

Java - Apache POI - Wrong date format for cell only in MS Excel

this is my first post in the site so sorry if I miss something, I´ll try to be as clear as I can I´m generating a XLSX file via Apache POI, with one the columns containing dates (in date format) The main problem is that the column which contains the…
1
vote
0 answers

XSSF Workbook identifier is returned as null for some users

I am using Apache POI Version 3.16. And I have set the identifier for the file being downloaded by users as below, workbook.getProperties().getCoreProperties().setIdentifier("somevalue"); But for some users when I try to read the identifier of the…
Heyyou
  • 151
  • 1
  • 13
1
vote
1 answer

Apache POI - How to write XSSFWorkbook to POIFSFileSystem?

Using Apache POI HSSF, we can create xls file like this private void write(HSSFWorkbook workbook) { POIFSFileSystem filesystem = new POIFSFileSystem(); filesystem.createDocument(new ByteArrayInputStream(workbook.getBytes()), …
kpk
  • 43
  • 1
  • 1
  • 6
1
vote
0 answers

Able to return the cell value but I'm still given System.ArgumentOutOfRangeException

I'm trying to return the cell value from an excel file and I am able to receive the value but right after returning the value it gives me a System.ArgumentOutOfRangeException. It's confusing since the program was able to receive the data and show me…
zaid iqbal
  • 101
  • 1
  • 2
  • 11
1
vote
0 answers

Not to read hidden sheets of xlsb file using XSSFBReader in apache poi

I am reading xlsb file using XSSFBReader class from apache poi library. I do not find any way to read only visible sheets of xlsb file. Currently, code reads all the sheets of xlsb file. How to read only visible sheets using XSSFBReader ? pkg =…
Mandar_P
  • 51
  • 6
1
vote
1 answer

how to get Image and data in same cell in xssfworkbook

I am trying to insert iamge and some data in same cell using apcahe poi xssf work book. I have tried something Like below Workbook wb = new XSSFWorkbook(); XSSFSheet sheet = (XSSFSheet)wb.createSheet(); Row row =…
phani kumar
  • 117
  • 10
1
vote
1 answer

How do I convert an area in an Excel doc to a table using Apache POI?

I've written an application that fetches data from a database and creates an Excel doc from said data using the XSSF classes in the Apache POI library. I've imported poi, poi-ooxml, and poi-ooxml-schemas, all version 4.1.0. The file gets written…
Wickerbough
  • 365
  • 1
  • 4
  • 15
1
vote
1 answer

Apache POI: Multiple cell comments in one cell are not allowed

I'm trying to add comment to cells. The code works fine for 2 rows. But when the row number goes to third, it starts giving me the error:- java.lang.IllegalArgumentException: Multiple cell comments in one cell are not allowed I add the comment…
Chetan Oswal
  • 430
  • 9
  • 21
1
vote
1 answer

Apache POI : Formula gets removed while reading the cell value using formula FormulaEvaluator

I am using poi version 3.17. In my java code I want to read a cell value which has formula and I am using evaluateInCell function of FormulaEvaluator to resolve the cell value. I have a template excel in my resource in which cells has formulas, if…
jrpsbadmn
  • 45
  • 1
  • 1
  • 6