You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my android application I am getting the following error:
org.apache.poi.ooxml.POIXMLException: http://xml.org/sax/properties/declaration-handler
2023-07-20 12:09:59.478 3957-3957 System.err com.example.myapplication W at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:66)
2023-07-20 12:09:59.478 3957-3957 System.err com.example.myapplication W at org.apache.poi.ooxml.POIXMLDocumentPart.read(POIXMLDocumentPart.java:657)
2023-07-20 12:09:59.478 3957-3957 System.err com.example.myapplication W at org.apache.poi.ooxml.POIXMLDocument.load(POIXMLDocument.java:180)
2023-07-20 12:09:59.478 3957-3957 System.err com.example.myapplication W at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:286)
2023-07-20 12:09:59.478 3957-3957 System.err com.example.myapplication W at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:88)
2023-07-20 12:09:59.478 3957-3957 System.err com.example.myapplication W at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:135)
2023-07-20 12:09:59.478 3957-3957 System.err com.example.myapplication W at java.lang.reflect.Method.invoke(Native Method)
2023-07-20 12:09:59.478 3957-3957 System.err com.example.myapplication W at org.apache.poi.ss.usermodel.WorkbookFactory.createWorkbook(WorkbookFactory.java:339)
2023-07-20 12:09:59.478 3957-3957 System.err com.example.myapplication W at org.apache.poi.ss.usermodel.WorkbookFactory.createXSSFWorkbook(WorkbookFactory.java:314)
2023-07-20 12:09:59.479 3957-3957 System.err com.example.myapplication W at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:232)
2023-07-20 12:09:59.479 3957-3957 System.err com.example.myapplication W at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:198)
2023-07-20 12:09:59.479 3957-3957 System.err com.example.myapplication W at com.example.myapplication.ChecklistPage.writeIntoFile(ChecklistPage.java:227)
2023-07-20 12:09:59.479 3957-3957 System.err com.example.myapplication W at com.example.myapplication.ChecklistPage$4.onClick(ChecklistPage.java:124)
Currently I am using apache poi 4.0.1 (no shadow poi) and I followed the steps mentioned #10 So my dependencies are:
Afaik my code is correct in terms of syntax. I do not get any error when I try to create a new .xlsx file and write into it. My problem only occurs when I try to write into an existing .xlsx file using FileInputStream. I suppose I have a problem with dependencies so how can I integrate shadow poi version which uses apache poi 4.0.1 into my project ?(it was mentioned in #90) I am also open to any other suggestions you can make.
The text was updated successfully, but these errors were encountered:
There is some problem with XML Parsing. There should be a nested exception in the output that seems to be missing, so you might get more information if you debug and inspect the exception at that point.
However I strongly suggest that you base your project on the latest version of this Repo (based on Apache POI 5.2.3) and use the approach with shadow-jar. This had a number of reasons and you would likely run into all of them one-by-one by trying to do it without.
I have to work on a lower poi version because I am writing an app for a device which uses Android 7. While browsing I found this repo https://github.com/andruhon/android5xlsx and it solved my problem. Thanks for the reply.
In my android application I am getting the following error:
Currently I am using apache poi 4.0.1 (no shadow poi) and I followed the steps mentioned #10 So my dependencies are:
I also added 3 lines mentined in #10 which are:
And my code where I get the error is:
Afaik my code is correct in terms of syntax. I do not get any error when I try to create a new .xlsx file and write into it. My problem only occurs when I try to write into an existing .xlsx file using FileInputStream. I suppose I have a problem with dependencies so how can I integrate shadow poi version which uses apache poi 4.0.1 into my project ?(it was mentioned in #90) I am also open to any other suggestions you can make.
The text was updated successfully, but these errors were encountered: