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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Removing data validations from Excel File programmatically

I have an excel file with data validation on each header. Data validations are of two types Any value List I have a requirement where I have to delete some columns, which in turn also means delete ...
Tanvi Garg's user avatar
0 votes
0 answers
41 views

How can I use programmatically read properties from a .msi file?

I have a Spring Boot application where the client can upload .msi files. When the client does so, I need to access some information that the .msi file holds. For example the icon, application name, ...
TheStranger's user avatar
  • 1,467
-1 votes
0 answers
19 views

How to add filter on count column in pivot table?

I need to filter pivot table based on count column values. Condition count>5 enter image description here How to implement this filter using apache poi in java.
pranavs's user avatar
0 votes
1 answer
36 views

How to implement label filter for pivot tables using apache poi?

I have data stored in a table format on Sheet1 enter image description here. Utilizing this data from Sheet1, I've generated a new pivot table on Sheet2 enter image description here . I'm looking ...
pranavs's user avatar
0 votes
0 answers
25 views

Why do SXSSF hyperlink show as 0 in excel but contains cell data compared to XSSF on apache poi?

I am using Apache poi 3.11 and tried using SXSSF (for memory efficiency) format to create my excel file (xlxs) but my hyperlink cells are display as 0 instead of the hyperlink text, Originally I was ...
Leandro Macato's user avatar
0 votes
0 answers
43 views

Apache POI Memory Usage

Is there a way to optimize Apache POI usage without using streaming? If I have a 63mb excel file with 500k rows, converting the file to CSV uses up over 7gb of RAM. As a source file, I downloaded ...
aarbor's user avatar
  • 1,408
0 votes
0 answers
22 views

How do I remove Apache POI from my computer and Excel files? I did not download it and it is corrupting my files so that I cannot open them [closed]

Apache POI suddenly appeared in my Excel. It changed the file so that I cannot access it on my other computers, nor can I email it to anyone. How do I get rid of this? How do I stop it from corrupting ...
Geralyn 's user avatar
1 vote
0 answers
29 views

Insert a csv file as embedded object in a word document using Java

I generated Word document file using Apache POI but want to insert a CSV file as an embedded object that can be opened (double clicking on it).Is there any code snippet available using Apache POI Java ...
Rajesh Om's user avatar
  • 502
-1 votes
0 answers
70 views

Java Insert line breaks in csv or empty rows in excel when discontinue level is found in csv to excel conversion jar

I am converting a csv file with | delimiter to excel using a JAR file and input csv has first column is Level. Level has consecutive values for some rows and discontinues in between. I want to insert ...
Max89's user avatar
  • 9
0 votes
0 answers
44 views

Is there any way to use POI to get Word text runs that are nested inside of an sdt / sdtContent element?

For a given paragraph using POI, I'm trying to do something with all the Runs contained in the paragraph. The following code gets the runs that are nested directly inside the paragraph element, but if ...
Jesse Barnum's user avatar
  • 6,589
0 votes
0 answers
65 views

Resizing comment boxes on Excel(Apache POI) based on dynamic content from a database isn't working

I'm attempting to create POI comments for certain cells on Excel Workbook of <org.apache.poi.ss.usermodel>. I'm able to view the comment box and the text is appearing, but the comment box size ...
Raj's user avatar
  • 1
0 votes
0 answers
90 views

While opening an excel generated using Apache POI 5.2.5 getting a pop up "We found a problem with some content in abc.xlsx. *****"

I created the going to generate the excel using Apache POI 5.2.5 and 4.1.2 both the version and I am getting the same pop up. The same code is running in the local system but when I try to run the ...
Mani Gupta's user avatar
-1 votes
2 answers
51 views

java.lang.NoSuchMethodError: org.apache.poi.xssf.eventusermodel.XSSFReader.getSharedStringsTable()Lorg/apache/poi/xssf/model/SharedStringsTable

I have upgraded the org.apache.poi-poi-ooxml-4.1.2 to 5.2.4 to fix few vulnerability issues. After that I got an error mentioned here and fixed it by adding a dependency commons-io.commons-io-2.13.0. ...
Vasanth's user avatar
  • 64
0 votes
0 answers
38 views

How to Correctly Merge Numbering in DOCX Files [updated code]?

I'm working on a function to merge two DOCX files using docx4j. I'm currently facing an issue with the mergeNumbering method. Despite following suggestions from a related Stack Overflow question, I'm ...
gmn_1450's user avatar
  • 133
0 votes
0 answers
30 views

Issues Merging Images in Docx Files Using docx4j

I'm using docx4j to merge two Word documents, but I'm encountering an issue with images not displaying correctly. The links, styles, and general file structure are merging as expected, but the images ...
gmn_1450's user avatar
  • 133
1 vote
1 answer
37 views

Embedding Images Directly into OOXML Content Without Using Relationships

In Microsoft Word's OOXML format, images are typically stored in the word/media folder and referenced in the document XML through relationships, as shown in this snippet: <w:drawing> <!-- ...
gmn_1450's user avatar
  • 133
0 votes
1 answer
41 views

Set image background to an existing slide apache poi ppt

I am trying to set image as a background to an specific slide that already exists (with blank background) and has some components (texts and images), but getting an error when opening the ppt created ...
Adrian Duran's user avatar
1 vote
1 answer
22 views

Trying to clear the entire contents of a content control including inner content control

I have a content control that currently looks like this. Using Apache POI 5.2.2 version. xml-fragment ....xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">...
bytor99999's user avatar
-1 votes
0 answers
48 views

java.lang.NoSuchFieldError: Factory when trying to convert word to pdf using Apache POI and opensagres [duplicate]

I am trying to convert a word document to PDF using Apache POI and fr.opensagres.poi.xwpf.converter.pdf in Java, but I'm getting the below error Exception in thread "main" java.lang....
Lakshyya Kothari's user avatar
0 votes
0 answers
51 views

Add data to ArrayList while read data excel with Apache POI

I am reading excel data using Apache POI. The problem is that I have 70,000 data in excel and I want to add the data to the ArrayList in splits by 3000 in the ArrayList. How to do it? Here is my code ...
Ferdy's user avatar
  • 1
0 votes
0 answers
50 views

Apache POI: getRow() Returns null although sheet contains non-empty rows

I'm trying to read rows from an Excel sheet which contains 148 rows. None of these rows are empty. When I use sheet.getRow(0), the result is null. The same situation occurs with sheet.getRow(47). ...
Radosław Poprawa's user avatar
0 votes
0 answers
17 views

Birt Engine and Apache poi combination compatible [duplicate]

I am writing a java code that will generate excel .xlsx file format. Using apache poi v5.0 and birt engine runtime v4.3.0. Looks like poi doesn't have setBoldweight() method. Is this version ...
Fred H's user avatar
  • 1
0 votes
1 answer
66 views

How to setup Apache POI Doughnut Chart Label outside of Chart using LeaderLine

I would like to know if there is any way to setup the Label of chart outside of the chart with a LeaderLine. Currently I can produce the left chart. But I want the chart look like the Right sided ...
raymax's user avatar
  • 85
0 votes
1 answer
60 views

how to set bookmark for XWPFRun object in word by poi

I am using Word to create templates that contain many variables. I will read and parse the Word document to set bookmarks for the variables. Each variable is a XWPFRun object. How can I set a bookmark ...
bill's user avatar
  • 35
0 votes
1 answer
67 views

Problem with function RANK.EQ in Apache POI

I'm currently working in a Java project that involves the analysis of an Excel Sheet. The project is built on the Spring Boot framework, utilizing Apache POI version 5.2.4 for Excel Sheet processing. ...
vcima's user avatar
  • 423
-5 votes
1 answer
91 views

How to add border cells in Java with POI

0 I am trying to add border in the excel using below Java code using apache poi. It's taking hours of time to get the border applied. I know i have used loops because the border has to be made based ...
tamilanban's user avatar
0 votes
1 answer
43 views

How to reposition XDDFChartLegend legends in Apache poi chart

I am creating multiple doughnut charts using Apache POI. I face problems when the label String size is big and when more labels are added. In the Apache POI documentation, I found no method in ...
raymax's user avatar
  • 85
1 vote
1 answer
44 views

File name in Excel Reference is always "[1]" using Apache POI when applying getCellFormula()

I am experimenting with Apache POI 5.2.4 and managed to read a toy Excel file using the following cut-together code (Java): // .. get file FileInputStream excelFile = new FileInputStream(file);...
Ahmed's user avatar
  • 13
0 votes
0 answers
21 views

Create Line Chart using Apache POI 5.2.3 [duplicate]

I'm trying to create an Excel (.xlsx) file that inserts a line chart below a table of data using Apache POI 5.2.3 and jdk 11. Unfortunately when I open the file I get an error message and the chart is ...
Agnese Tedeschi's user avatar
0 votes
1 answer
34 views

Insert Multi para tags in a single cell in Excel sheet using Apache poi

I have an input coming as below: <p style="font-family:Caveat;">This is Caveat</p><p style="font-family:Arial;">This is Arial text</p> I want to insert ...
user2755407's user avatar
1 vote
1 answer
30 views

How to change the background color of Anchore

I am implementing an Apache POI chart which creates three Chart. The background color of the chart is WHITE. But i would like to change it to custom RGB color. In the above image I want to change ...
raymax's user avatar
  • 85
0 votes
1 answer
44 views

Reading embedded excel using apache poi Java

Is there a way to read embedded excel file in Java as shown in the below image Currently I'm using the below piece of code to read the excel file File xlsxFile = new File("test.xlsx"); ...
Karthick88it's user avatar
-1 votes
0 answers
66 views

Is there a way to edit XSLFSlideShow footer text using ApachePOI

Is there a way to edit .pptx XMLSlideShow document footer programmatically using Apache POI? Also I have multiple XSLFPictureShape in slides to which I need to assign different images using Apache POI,...
Furqan Ahmed's user avatar
0 votes
1 answer
34 views

Apache POI chart position vertically changed when more labels are added

I am writting a code which create Two Doughnut Charts in excel file. The first chart has 10 labels and Second chart has 2 labels. My Issue is with the second chart.I want to have both Chart Vertically ...
raymax's user avatar
  • 85
0 votes
1 answer
50 views

Apache poi multiple Doughnut Chart in XSSFClientAnchor

I am writing a code which creates multiple DoughnutChart in excel file.I can create multiple doughnut Chart and put them side by side using multiple anchore. Now i have two issues Values are not ...
raymax's user avatar
  • 85
0 votes
0 answers
22 views

NPOI reads wrong Formula value inside sheet data validation

For some reason, NPOI returns "A65535" instead of "F9" in Formula1 field inside data validation. I read all validations from sheet using sheet.GetDataValidations() method, and then ...
Stefan Kostic's user avatar
0 votes
0 answers
26 views

Adding and image to XSLFTextRun using Apache POI

I am using Apache POI to add an XSLFTable dynamically to a slide, the XSLFTable can contains text and images. In docx file extension I can successfully add images to XWPFRun using following code. ...
Furqan Ahmed's user avatar
0 votes
1 answer
102 views

Excel files created with Apache POI won't show line chart anymore

We're using Apache POI in our web app for "years". Suddenly both new and old files created from our app, won't show the line chart. Right now we're using 5.2.3, but files created this spring,...
Thomas HG's user avatar
0 votes
0 answers
53 views

Read cell style using fastexcel

Is it possible to read or discover styles applied to cells in excel sheet using fastexcel library in Java? I'd like to find out what color is applied to cell background or what color is applied to a ...
Jakub Kowalczyk's user avatar
0 votes
1 answer
78 views

Issues with Gradle building Apache POI package for java

Previously when using Apache packages, they have included jar files and all I had to do was import them into by build path. With Apache POI (5.2.4-20230921), it now uses Gradle to build the jars. I ...
EngineerWithJava54321's user avatar
0 votes
0 answers
53 views

Copying an XSLFTableRow to XSLFTable using Apache POI

I have successfully added/copied rows to XWPFTable using Apache POI but unable to achieve the same in XSLFTable. Following is the code for XWPFTable public void addNewTemplateRowToTable(...
Furqan Ahmed's user avatar
0 votes
1 answer
49 views

Show a text in a box in Word by POI

I want to show a text in Word inside a box using Apache POI XWPF like this: This example was done in Word using a shape with a text inside the shape. But I am not able to do this correctly in Word ...
Hervé Girod's user avatar
0 votes
0 answers
33 views

What could be causing the code to function correctly locally but only partially on the staging environment?

I am using tika and poi dependencies to detect file mime types and storing those files accordingly. import java.io.File; import java.io.IOException; import org.apache.tika.Tika; import org.slf4j....
Esphi01's user avatar
0 votes
1 answer
57 views

How to delete/remove an entire row in an Excel (XLS) file

I created an XLS file with LibreOffice and I want to manipulate it with IntelliJ (using Java 20 and Apache POI 5.2.3). In the else statement (when checkbox4 is not selected) I want a particular row to ...
Knuckles's user avatar
-1 votes
1 answer
44 views

How do I make multicolor text in the same line in word using Apache PO in JavaI?

I need to generate a word document using Apache POI that has multiple colors of text in one single line and then ends with a horizontal line break. Like in the example bellow: What I want I tried to ...
just_dodge_lmao's user avatar
2 votes
0 answers
42 views

Apache POI+OOXML memory usage

I'm currently working on a Kotlin + JVM project, where we have an Excel file which we use as "source of information". In order to parse this file and create our own objects we are using &...
William Assoni's user avatar
0 votes
1 answer
67 views

Apache poi cant find method of log4j org.apache.logging.log4j.Logger.atDebug()

When I tried to read an excel file this error shows: Exception in thread "main" java.lang.NoSuchMethodError: org.apache.logging.log4j.Logger.atDebug()Lorg/apache/logging/log4j/LogBuilder; ...
azer-p's user avatar
  • 324
1 vote
0 answers
65 views

Apache-poi ooxml Exception org.glassfish.jersey.server.ContainerException: java.lang.NoSuchFieldError: Factory

I'm trying to create a service that receives an array of data and creates an xlsx spreadsheet that will then be returned as base64. However, I can't get the libs to work... I tried other versions and ...
Clovis Carvalho's user avatar
1 vote
3 answers
219 views

Need help regarding an error in the Dockerized version of the application

I am currently working on an application that uses a Spring Boot-based backend based on Java 17. I use Maven as the build tool. The front end is a ReactJS-based application. In my developer ...
Gehan's user avatar
  • 450
0 votes
0 answers
55 views

How to edit code fields in word document using apache poi

I'm trying to edit existing word document containing some placeholders, some of those are in code fields (those from Ctrl+F9) and I have no clue how to easily replace contents of these fields. I've ...
Havooc's user avatar
  • 1

1
2 3 4 5
196