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

Taking lot of time to open a workbook

I am trying to read a excel file(xlsm as have macros) everything seem to be correct but somehow code taking lot of time to execute. Here is my code: public Map getParameters(String excelFileName) { File excelFile =…
user565
  • 871
  • 1
  • 22
  • 47
0
votes
2 answers

Get each cells data from Excel converted to XML to stored to DB

After looking for some resources, I could load an Excel file which contain 1.000.000 rows data. But, I did not know how to get each data. Here is my code so far... public void create(MultipartFile file) throws Exception { try { …
Akza
  • 1,033
  • 3
  • 19
  • 37
0
votes
1 answer

How to retain newline character while converting the printstream from XSSF XLSX2CSV class to ByteInputStream?

I am using Java SAX parser to read data from Excel (using XSSF XLSX2CSV class) and load it in to Greenplum database. I am using the code from the following…
CuriP
  • 83
  • 10
0
votes
3 answers

Getting NoClassDefFoundError when trying to read excel sheet using Apache poi api

Host machine : Ubuntu 18.04 openjdk 10.0.2 2018-07-17 I am trying to read data from an Excel sheet using Apache POI but getting the NoClassDefFoundError. This is my code : package readatafromexcel; import java.io.File; import…
Naveen
  • 7,944
  • 12
  • 78
  • 165
0
votes
0 answers

Unable to Create WorkbookObject

I am trying to write my ResultSet into an excel workbook. to do that I am using poi-ooxml-3.17 lib. But I am unable to create Object of XSSFWorkbook. My control not going after below line. also I am not getting any exception XSSFWorkbook workbook =…
ansh
  • 573
  • 3
  • 9
  • 26
0
votes
0 answers

MemoryStream not writing data from datatable

I have datatable that I'm populating with data and passing through to a method which is supposed to write the data to a memory stream and save it as an Excel spreadsheet. The datatable is correctly populated, but when the memorystream writes it, the…
user1397978
  • 255
  • 1
  • 7
  • 24
0
votes
0 answers

Setting styles in excel cell puts the same style to entire workbook

The problem I'm facing is when I'm trying to introduce any styling to any particular cell, the same styling gets applied to entire workbook, even to the sheets which I'm not accessing at all(the additional sheets present at the end). e.g., when I'm…
Snehansu
  • 13
  • 3
0
votes
0 answers

Reading XLSX data in SpringBatch

I have an xlsx file that has to be read and the date field needs to be written to MYSQL DateTime column. The date in the excel file is in the format " 2018-08-06 16:32:58" But when I read it using PoiItemReader and then convert it in a custom…
0
votes
0 answers

XSSFRichTextString with mixed font ignores newline after bold font only

In below code, I intend to have "Jack Reacher" in bold style and the rest of the string as normal font. I am not able to see the newline appended in report after "Jack Reacher". Newline gets applied if I comment and ignore bold…
0
votes
1 answer

Apache-POI sets values in Excel, but the formula of another cell is unable to work with the value until I manually press enter in the processing strip

I wrote a programm, that writes values into a xlsx-file. At the first glance it seems to work like it should. But in my xlsx-file I've got a Formula in another cell that should works correct if I type in the value manually, but if my programm sets…
Robin
  • 41
  • 1
  • 9
0
votes
1 answer

Java Apache POI Excel set border on specific cell and set currency cell format

I am working to generate excel using java apache poi i just need to beautify it (with border) below is the excel that i have successfuly create and here is the excel that i wanted (see those border and currency and background color) heres some of…
Alexander Chandra
  • 587
  • 2
  • 9
  • 23
0
votes
1 answer

Start the table from a specific column excel apache poi

I'm having a problem in excel while using Apache POI. I can create rows, but sometimes I'm in a situation where I would like to start from a particular column only. So is it possible to start any particular column like the 'C' column Instead of the…
Hachem
  • 1
  • 5
0
votes
0 answers

Getting large result set in an excel - java

I am querying a table that generates about 60,000 records, which I am getting in a result set. I wish to get the results from the result set in an excel. I tried using HSSFWorkbook, and I am able to get an excel of about 30,000 records but fails…
0
votes
0 answers

Unable to add Validation Data in XSSF Sheet

I'm trying to write a simple program to add dropdown box in XSSFSheet in xlsm files. I've written the following code import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.opc.OPCPackage; import…
IshanAg24
  • 199
  • 2
  • 11
0
votes
1 answer

Apache POI lock the cell but allow column resize

I create an Excel file through Apache POI XSSF and I lock the sheet with a password so user can't change the value of the first two row and first five columns (I lock the sheet and allowed editing of other cells). All work fine, the only problem is…
luca
  • 3,248
  • 10
  • 66
  • 145