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
3
votes
1 answer

Apache POI excel cell style update

Using Apache Poi I'm exporting my table to an excel sheet. I extended ExcelExport class, override the getCellStyle method and customized my cell styles. Now what i want is when a user edits any cell in the excel document i want that cell to change…
Spring
  • 11,333
  • 29
  • 116
  • 185
3
votes
2 answers

I'm trying to read from a word file .. I don't know which jar file I missed :

I'm trying to read a word file .. but actually there is a problem it says that " The type org.apache.xmlbeans.XmlException cannot be resolved. It is indirectly referenced from required .class files " .. so can I know the problem ?? import…
Mevo Hafez
  • 161
  • 1
  • 5
  • 10
3
votes
1 answer

Formatting text using Apache POI 3.8 (HWPF)

I am trying to insert the following text in the document using Apache POI 3.8: [Bold][Normal], but the output document has this: [Bold][Normal] The code: import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.usermodel.*; import…
Frolovskij
  • 31
  • 3
3
votes
1 answer

R: rJava error with xlsx (0.4.2) package

I am trying to use the xlsx package to fill a spreadsheet with information from an external file. Up until now, I have used addDataFrame() to put information into the spreadsheet, and everything about it that I have tried has been successful (fonts,…
KritSandvich
  • 177
  • 1
  • 2
  • 8
3
votes
4 answers

Choosing an excel java api

All I need to do is open an MS excel sheet - not sure which kind yet (2003, 2007, etc.) - and parse the information in each row into an object. I'm performing only readonly operations. out of Apache POI, JExcelAPI, or OpenXLS which is best for this…
Victor
  • 5,697
  • 6
  • 34
  • 41
3
votes
1 answer

Runtime error in java with apache POI

I get the error: java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setSaveAggressiveNamespaces()Lorg/apache/xmlbeans/XmlOptions; at org.apache.poi.POIXMLDocumentPart.(POIXMLDocumentPart.java:56) from the line 56: public static…
Nick
  • 85
  • 2
  • 5
  • 11
3
votes
1 answer

Apply POI Custom color using 'Hexadecimal Color Codes' provided

I am currently using HSSFColor/HSSFPalette and XSSFColor to set the Existing/Custom Colors. Implementation is as follows : for e.g. font.setColor(HSSFColor.WHITE.index); for HSSF or cs.setFillForegroundColor(xssfColor); for XSSF I want to pass…
sidd
  • 31
  • 1
  • 1
  • 3
3
votes
7 answers

java.lang.outofmemory exception while reading excel file (xlsx) using POI

I am developing a web application which reads data from excel file (xlsx). I am using POI for reading excel sheet. The problem is when I try to read excel file, the server throws the following error: The excel file I am trying to read has size of…
Khawar Raza
  • 15,870
  • 24
  • 70
  • 127
3
votes
2 answers

How to create dependent drop downs in excel sheet generated using POI?

we have a function in our java based web application where user can download an excel sheet template from the web application. Fill their data in this template and then upload the same excel sheet. The system then reads this excel file and save…
ajm
  • 12,863
  • 58
  • 163
  • 234
3
votes
1 answer

Java: parsing ms-word document using POI/HWPF

I have a ms-word document (MS-Office 2003; non-xml). Within this document there is a string associated with a bookmark. Furthermore, the word document contains word-macros. My goal is to read the document with java, replace the string associated…
user136200
  • 51
  • 1
  • 5
3
votes
2 answers

What is the difference in java.lang.OutOfMemory: GC Overhead limit exceeded vs. java.lang.OutOfMemory: Multicast listener

I am investigating the slowness in our application and eventually one of the instances in a cluster environment going down. Few weeks back I came across the error…
Anthony
  • 33,838
  • 42
  • 169
  • 278
3
votes
3 answers

Apache POI HSSF XLS reading error

Using the following code while reading in a .xls file, where s is the file directory: InputStream input = new FileInputStream(s); Workbook wbs = new HSSFWorkbook(input); I get the following error message: Exception in thread "main"…
Nick
  • 85
  • 2
  • 5
  • 11
3
votes
3 answers

POI OutOfMemory Exception with xlsx (XSSF)

We am trying to use POI 3.8 for an excel component in our application which has to deal with creation of large excel files. I was happy to use SXSSF streaming approach which was fast and very less memory foot print. However, I am not able to do Data…
Sriram
  • 31
  • 1
  • 2
3
votes
2 answers

POI Formula Evaluater IFERROR

I am using POI 3.8 to read the excel i am using User model api of POI which is capable of reading HSSF and XSSF both but there is some problem in evaluating the fomula POI 3.8 doesnt support the IFERROR function of Excle is there any alternate and i…
ShijuJohn1093
  • 33
  • 1
  • 5
3
votes
3 answers

Apache POI - How to register a function

I read the tutorial on the website of Apache POI on how to register custom functions into a FormulaEvaluator and I wanted to use it to define the function MINVERSE for which POI does not provide support. So, first off I created a class that defines…
Pantelis Sopasakis
  • 1,902
  • 5
  • 26
  • 45