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
0 answers

Upgrade from 3.1.0 to 4.0.0 throws NoSuchMethod for org.apache.xmlbeans.XmlOptions.put(Ljava/lang/Object;)

Upgraded XMLBeans from 3.1.0 to 4.0.0 and it throws a NoSuchMethodError exception for org.apache.xmlbeans.XmlOptions.put(Ljava/lang/Object;) when open is called. Stacktrace: java.lang.NoSuchMethodError:…
dotmindlabs
  • 778
  • 1
  • 12
  • 35
2
votes
1 answer

Implementing Excel Function in POI API

How can I implement an unimplemented Excel function in the POI API without recreating the jars to change the FunctionEval class and possibly some other classes? Can I just create a function and register it somehow?
questioner
  • 775
  • 4
  • 9
  • 15
2
votes
1 answer

how to solve NotOfficeXmlFileException

I have an API for uploading excel file to a server and read it, so my code below public ReturnSTH funcExample(@RequestParam("file") MultipartFile file) { Sheet sheet = null; try { InputStream in = file.getInputStream(); …
Aoon
  • 21
  • 2
2
votes
1 answer

Apache Poi Chart custom Data Labels

I have created a XDDFScatterChart with series and data points and created data labels for some data series. I found that i can use standard labels consisting of x and y coordinates and series name. Now I want to set a custom text as a label for…
bierpreis
  • 91
  • 5
2
votes
0 answers

Apply style and numbering to word document with Apache POI

I am using Apache POI to edit the content of a docx file. I also need to apply a specific style to said docx. The style I need to apply is in a dotx file. In this question How can I use predefined formats in DOCX with POI? I have found the following…
Anne
  • 219
  • 2
  • 8
2
votes
1 answer

Apache Poi - Value in a cell having error in existing workbook is not recalculated

I have an existing Excel workbook in which two "output" cells (with range name "rate" and "premium") have formulas based on values in other "input" cells (i.e. range names "loamamount", "loanterm", "age" and "smoker"). If, in the Excel workbook, I…
Rajesh P
  • 23
  • 5
2
votes
1 answer

Issue with apache poi - Upgrading AEM from 6.5.2 6.5.5

We are planning to upgrade our AEM from 6.5.2 to 6.5.5 through service pack: https://docs.adobe.com/content/help/en/experience-manager-65/release-notes/service-pack/sp-release-n.... While following the instruction, I installed the 6.5.5 package and…
2
votes
1 answer

Java compiler errors in DDE on new computer, works fine in old one

I have 2 computers running Domino Designer, On my new one I get java errors in a server based application and not on the old one. I have installed the required package on both machines and I have the same compiler set in prefs. The computer with…
Thomas Adrian
  • 3,543
  • 6
  • 32
  • 62
2
votes
2 answers

Confusion on Interface Workbook, Sheet and Row vs Classess XSSFWorkbook, XSSFSheet

Below is a simple code to access all the cells of an excel sheet. I didn't use the classes XSSFWorkbook, XSSFSheet...etc My confusion is if an interface only holds signature of the methods then how come I'm able to use methods like getRow, getCell…
zara
  • 99
  • 1
  • 8
2
votes
2 answers

POI reading Excel file with body in String

Currenty I am trying to read an Excel file that is polled via Apache Camel (2.25.1). This means the method gets the file contents via a String: @Handler public void processFile(@Body String body) { For reading the Excel file I use Apache POI and…
user
  • 23
  • 2
2
votes
3 answers

Map values are getting overridden while iterating through Map

I'm trying to fetch data from excel sheet using Apache poi jars. I have three rows and four columns in my excel. The actual data is in 2nd and 3rd row. 1st row is headers which I'm using as key for fetching the values. While I do this, the output I…
Kaustubh
  • 506
  • 4
  • 22
2
votes
1 answer

How to save excel with formula in Apache Poi?

If there is a cell with a formula and save the file, then after manually closing the file, the excel will be asked to Save the changes? How to make a full save of file from the program because without this saving, I cannot get the correct value by…
MrPingu1n
  • 35
  • 4
2
votes
2 answers

Apache POI-HSSF: Getting Decimal Instead of Text String

I am using Apache POI-HSSF for working with Excel files. I have a cell in my spreadsheet that looks like "115". I verified that it is formatted as "Text" (Format Cells -> Text). However, when I read it in as row.getCell(0).toString() I get this…
user783312
  • 65
  • 1
  • 5
  • 9
2
votes
1 answer

How to get Function expression Apache POI

I'm using Apache POI Library, how can I read the function expression from the excel. I need to read both the value 15 and the expression which has been used to calculate it, =5+10. Does Apache POI Support this functionality?
Shiva kumar
  • 673
  • 8
  • 23
2
votes
1 answer

How to write large amount of text using POI hwpfdocument in a .doc file in java

I am new to POI API and therefore, whenever I am using the HWPFDocument class to write down text in a .doc file created by the HWPF Document, the resulting doc file is having only a single letter and not the entire text, I wrote. So please give the…
Ankur Mukherjee
  • 3,777
  • 5
  • 32
  • 39