Cannot Read xlsx File Generated from java apache.poi.xssf library #2011
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#2011
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi, Thanks for your work, first.
In my project, the business logic is like below.
In Java(Spring) Project : Read an Excel File that is Filled with values and fomulars --> Create a Row and Cell below the last row --> A Client(In my case Chrome Browser) Download the File --> Run Code XLSX.read() --> Run Code XLSX.utils.sheet_to_html() --> Draw a Table from the excel file
The Problems are ...
SheetJS could read the origin values from the excel file, but skipped the values that generated from the java apache poi. Weird thing is that the SheetJS can get the values as data including java generated but the ref range like ("A1:F5") does not include the created area.
(Here, If I do something(like putting a value, saving file, ...) on the excel file with office-excel program, then it can read all of the values)
The problem above applied to the formula cell as well.
When I edit a value with java apache poi, SheetJS could not show the calculated value on the table. Yes, it could calculate and show the origin values by the way.
I'm sure someone experiencing same thing like me. And I expect that someone reply for those things.
Thanks for reading.
Can you share a sample file so we can take a closer look?
Sure, below is the source.
Thanks for your comment.
////// 1. A Client request get an excel file
////// 2. Server send response with Java file
// Java file has a process logic like below
////// 3. Client get a response from the server and SheetJS works like below
I would be pleased if I could attach my sample files.
I found a demo page you made ---- https://oss.sheetjs.com/
The problem I mentioned is occurring there as well when I drop the sample files.
Since, I cannot attach the files, I attach images that I tested on your demo page.
======= CASE:: Cannot Read the Cells I Added =======

======= CASE:: Can Read the Cells I Added After Open the File with Excel Program and save with doing nothing =======

You should be able to add a file here on github, just click and drag the file into the reply window. If you can't, please email it to hello@sheetjs.com.
In any case, If I had to guess it's a POI issue not updating the worksheet range
Wow, I did not know that. What a fool.
The attacked file 1_NoIden.xlsx is the one from POI.
Drag it into the demo page. And then open with excel program. Then save it doing anything.
Re-drag it into the demo page. And then you can see the difference.
1_NoIden.xlsx
It's not obvious that you can drag-drop files. It's written below the box, but there really should have been an upload link or something above the input box.
That said, this is a mixed issue. To explain, go to https://oss.sheetjs.com/cfb-editor/#/ and drag-drop the file. Then click
xl/worksheets/sheet1.xml
and click(View as Text)
. You will seeThat is saying the file range is B1:D9, which is what SheetJS use to determine the sheet range. If you scroll further you'll see references to E8/F8, which are both outside the reported range.
If you have patience, we can open a discussion with the POI project and see if you have to do something different to get the library to update the worksheet range.
As for the other side, the reason we've tried to trust the
dimension
record is based on the actual worksheet representation. Generating millions of small strings is a massive performance killer in V8 / chrome :(@Yocoms we raised POI bug 64536.
No update on that bug. Use this to update the range programmatically: