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

POI-OOXML dependency not recognized

I want to create an .xlsx workbook. Following instructions from tutorials and other Stackoverflow questions such as the following Cannot import XSSF in Apache POI I added the following dependency :
rpd
  • 462
  • 1
  • 9
  • 24
0
votes
1 answer

OutOfMemory issue while creating XSSFWorkbook instance to read XSLX file

As per business functionality we need to read multiple excel files(both .xls and .xlsx format) at different locations in a multi thread environment. Each thread is responsible for reading a file. In order to test the performance, we have created 2…
0
votes
1 answer

Java - Trouble loading file NoClassDefFoundError

Solved: I needed to add another jar file that was in another folder All of my code is below. It is from this website. I've read over multiple examples of loading XSSF files, but I continue to get this same error. All of my imports are correct,…
Dominic
  • 164
  • 2
  • 11
0
votes
0 answers

XSSFWorkbook takes a long time to load. How long should it take?

I have seen plenty of similar questions but none of the solutions work for me. I am trying to load a .xlsx file with 8 columns and 3 rows. There is just numbers in the cells and nothing else in the file. It's taking over 10 seconds to load this…
OneTwo
  • 2,291
  • 6
  • 33
  • 55
0
votes
1 answer

Persisting XSSFRichTextString in (mongo)DB using Apache POI

For a project I'm reading rich text from an excel file (.xlsx), which should be stored in a mongoDB to be copy-pasted into another excel file later. Right now I'm trying to save it like this: public static BasicDBObject…
Jumboman
  • 521
  • 3
  • 9
0
votes
0 answers

creating multiple pdfs from multiple excel files that support both formats in java

below is my code to convert excel to pdf, but i dont understand how do i generate multiple pdf from multiple excel sheets. String files; File folder = new File(dirpath); File[] listOfFiles = folder.listFiles(); for (int i = 0; i <…
0
votes
0 answers

Getting error "Unable to read entire header" when created file through apache POI

I am using Java and POI 3.7 and I want to perform following in xlWrite() function- 1. Check the file. If it doesn't exist create a new one. If file exists, delete it and create a new one. (DO I have to delete it or if it exists already my new…
For Testing
  • 281
  • 2
  • 5
  • 19
0
votes
0 answers

Getting an error while reading an Excel file

I am trying to read an Excel file but I am getting this error: org.apache.poi.POIXMLException: org.apache.poi.openxml4j.exceptions.InvalidFormatException: Package should contain a content type part [M1.13]. public…
Pankaj Dagar
  • 87
  • 10
0
votes
1 answer

Getting specific data from an excel sheet JAVA

I am trying to get specific data from an excel sheet, The data is dynamic. It can be anything really. The column headers are the only things i can use for placeholders, but the column header positions can vary in the sheet. For example i have a…
JavaPotter
  • 15
  • 1
  • 1
  • 3
0
votes
1 answer

CellStyle dataformat for XLSX

I have some code like : CellStyle cs2 = wb.createCellStyle(); CellStyle cs4 = wb.createCellStyle(); cs4.setDataFormat(HSSFDataFormat.getBuiltinFormat("CELL_TYPE_NUMERIC")); cs2.setDataFormat(HSSFDataFormat.getBuiltinFormat("text")); this is for…
AbtPst
  • 7,778
  • 17
  • 91
  • 172
0
votes
1 answer

Apache POI XSSFFont getBold() give null pointer exception

I'm trying to check whether the font in excel is bold or not.I kept getting a null pointer exception everytime I run the code. XSSFSheet sheet1 = workbook.getSheetAt(1); XSSFRow row1 = sheet1.getRow(1); XSSFCell cell4 =…
ericDaWang
  • 182
  • 2
  • 6
  • 15
0
votes
1 answer

applying styles to a complete row using xssfworkbook in java

Here,I am applying styles to excel,if I apply styles to individual cell it is working but takes lot of time to copy content and apply styles.Here we have option for applying styles to entire row at once using "row.setRowStyle(Style);" but styles…
0
votes
1 answer

XSSFWorkbook poi: adding image IOUtils toByteArray unfined error

To insert image to excel using POI:XSSF I am using maven poi dependency: org.apache.poi poi-ooxml 3.8 AND code as : InputStream my_banner_image =…
Nomad
  • 751
  • 4
  • 13
  • 34
0
votes
0 answers

Basic shapes in poi

I am really having some problems finding a way to create a triangle in poi using Shapes. Is this not possible? From what i have read around, poi should be able to draw basic shapes... Is triangle not one of them? This example provided by poi does…
Bogdan M.
  • 2,161
  • 6
  • 31
  • 53
0
votes
0 answers

POI: How to get the design color from XSSF?

I have a big cell style problem with poi and XSSF. EDIT 2015-01-06: The green cell has a design color und the blue cell a standard color. The standard color works good, but the design color only works with HSSF. How can i get the design color of a…
Smoothi
  • 283
  • 1
  • 3
  • 15