Saving spreadsheet with images result in errors - does not round-trip
Read a spreadsheet file with embedded images, then writing it back out as a new file.
The new file contains errors (Excel pops up warnings). Images are missing.
Attached is the test file test.xlsx and the output file output.xlsx.
@schungx Thank you for your report. We will investigate the cause.
Anything I can do to help diagnose this problem? It seems to only happen when there are embedded images.
Most images ended up disappearing, but some are intact.
@schungx Thank you very much. By analyzing the file you submitted, we were able to determine the cause of the error. We have corrected the program. Please obtain the latest version and check it.
Will do and revert.
I confirm that your fix solved the problems with the test file.
However, with a real file with hundreds of images, it comes back with errors:
with the log:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<logFileName>error545240_01.xml</logFileName>
<summary>Errors were detected in file 'C:\Git\holycrown\xyz.xlsx'</summary>
<repairedRecords>
<repairedRecord>Repaired Records: Drawing from /xl/drawings/drawing1.xml part (Drawing shape)</repairedRecord>
<repairedRecord>Repaired Records: Drawing from /xl/drawings/drawing2.xml part (Drawing shape)</repairedRecord>
</repairedRecords>
</recoveryLog>
The most annoying thing is... it sometimes swap images with some other images, but not all the time.
I'll try to make another test file for you.
Here is another test file with the output. You'll find that:
-
There are errors when opening
output.xlsxsaying that some drawings have been fixed -
Many images are swapped to something entirely different
-
Some images are not found
@schungx Hmmm, looks like it needs a little more renovation. We will continue to address this issue.
Reopening this issue since I've found more cases where there are still problems with round-tripping.
xxx.xlsx is the source file. output.xlsx is the file saved.
As you can see, output.xlsx contains two errors that Excel complains about when you try to load it.
@schungx Thank you for your report. We will respond to this as well.
Trying to remove a column and a row from a spreadsheet results in errors.
I believe some offsets are still not properly adjusted... In particular, I believe merged cells and shared formulas are not properly adjusted when rows/columns are added/removed.
The latest version has been released. Please check to see if any problems have been resolved.