Questions tagged [apache-poi]

Apache POI is a Java library for reading and writing various Microsoft file formats, especially Office related ones. It supports OLE2 and OOXML based formats, such as XLS, XLSX, DOC, DOCX, PPT and PPTX as well as a few others.

The mission statement of the Apache POI project is

... to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft's OLE 2 Compound Document format (OLE2). This includes Excel formats (.xls and .xlsx), Word (.doc and .docx), PowerPoint (.ppt and .pptx), as well as others to a lesser extent like Visio, Outlook and Publisher.

This tag should be used for questions around using and extending Apache POI. Questions on the .Net port should use the tag instead.

More information on Apache POI, the bug tracker and download links are available from https://poi.apache.org/

If you are starting with Apache POI, you may find the Busy Developer's link very useful : https://poi.apache.org/spreadsheet/quick-guide.html

Apache POI releases are available under the Apache License, Version 2.0.

9727 questions
2
votes
2 answers

How do i create excel chart with SXSSFSheet using apache POI?

My project is using SXSSFWorkbook in order to generate excel files as the excel files generated in the application can be of large size as well. Now I need to include excel charts in these excel files as well and i am not able to create charts with…
Amit Pokhrel
  • 282
  • 4
  • 21
2
votes
1 answer

Apache POI to ignore empty cells for Text format

I am parsing Excel using Apache POI. Is it possible to get Apache POI to treat empty strings as null and ignore them? There can be excel sheets that sets millions of cells as Text as attached below, causing all the cells to be interpreted as empty…
stackyyflow
  • 767
  • 3
  • 11
  • 30
2
votes
1 answer

Write HSSFWorkbook to hdfs

I need to parse a csv file to xml and write it to hdfs. I managed to do the first part successfully, but get errors when writing. Here's the code. private static void writeToXml(String inputPath, String outputPath) throws IOException,…
gjin
  • 860
  • 1
  • 14
  • 28
2
votes
1 answer

Error in Adding values in drop down list of Excel using Apache POI

I have this code: CellRangeAddressList addressListTax = new CellRangeAddressList(rowCount, rowCount, labelRowCnt, labelRowCnt); DVConstraint dvConstraintTax = DVConstraint.createExplicitListConstraint(new String[] { "I0-Input Tax 0%",…
Raj
  • 255
  • 2
  • 6
  • 17
2
votes
3 answers

How to Un-Hide a hidden row in Excel using Apache Poi in Java?

I have: import org.apache.poi.ss.usermodel.Row; if ((currentRow = sheet.getRow(currentDataRow)) == null) { currentRow = sheet.createRow(currentDataRow); // Creates a new row. } // How to un-hide currentRow ? currentRow is…
Yugal Jindle
  • 44,057
  • 43
  • 129
  • 197
2
votes
1 answer

Update Cell in excel file using Java Apache POI

I'm trying to update an empty cell in an existing excel file using Java ( Apache POI ), here is the code I wrote, I don't get any errors and the values aren't changed either . FileInputStream file = new FileInputStream(new…
dEs12ZER
  • 788
  • 4
  • 24
  • 51
2
votes
0 answers

How to write in specific column based on header title in Excel using Apache POI?

I want to write data in a specific column based on the column header title and an attribute of the data to be written. For example, if I have 3 columns, first column with header title "aaa", second column with header title "bbb" and third column…
GFriends
  • 35
  • 5
2
votes
1 answer

How to build Apache POI - Java API To Access Microsoft Format Files from sources?

I need to build https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas/4.1.2 project from sources. Since I didn't find any sources except these https://archive.apache.org/dist/poi/release/src/poi-src-4.1.2-20200217.zip I am trying to…
2
votes
1 answer

Apache POI set cell Format That include the result of Table Total Row

it is possible to set a cell formula on a row table that is include total row ? For Example : i have a total row Like bellow : Col[B] Has a SUBTOTAL And Col[C] Also Has a SUBTOTAL i need Col[D] to be The Totals of Col[B] + Totals of Col[C] Or /…
Adeeb Mark
  • 131
  • 1
  • 8
2
votes
1 answer

Apache POI Format Table Not showing Total Row

i have a class to create formatted table using the code below : public class formatAsTable { public static void main(String[] args) throws FileNotFoundException, IOException { Workbook wb = new XSSFWorkbook(); …
Adeeb Mark
  • 131
  • 1
  • 8
2
votes
1 answer

How to Add negative value for DataBar in apache poi?

i used this code to create a databar : import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFDataBarFormatting; import org.apache.poi.ss.util.CellRangeAddress; import…
Adeeb Mark
  • 131
  • 1
  • 8
2
votes
1 answer

Receiving Cannot get a NUMERIC value from a BOOLEAN cell when exporting XML map

I have a workbook with an XML mapping defined (I am using POI 4.1.2). A mapped cell contains a formula which evaluates to boolean: =AND(B70="";B71=""; B50="No") I try to export the XML mapping with the following code: // First ensure that all…
Abid
  • 565
  • 1
  • 5
  • 15
2
votes
2 answers

Evaluation from Apache POI and JExcel Api

I need create Excel woorkbooks in Grails, Grails support both Apache POI and JExcel Api, but I would like you to tell me about the advantages and disadvantages of both. According to I know, Apache POI is more faster than JExcel Api, but the JExcel…
yecid
  • 180
  • 3
  • 16
2
votes
1 answer

Apache POI - watermark in Excel - different appearence in Excel and LibreOffice

I follow the sample and add pictures as watermark like the following: private void addWaterMark4AllSheets() { final BufferedImage image = FontImage.createWatermarkImage(); // Export to byte stream B final ByteArrayOutputStream os = new…
LeO
  • 4,238
  • 4
  • 48
  • 88
2
votes
0 answers

Does a shared excel have any limitations when used with Java + Apache POI?

The question is very simple but I've never seen it asked on stack. Will Apache POI work with a shared excel (meaning the excel is "co-authored" with other accounts as per Excel verbiage)? Will I still be able to create a pivot table using Java? How…