umya-spreadsheet icon indicating copy to clipboard operation
umya-spreadsheet copied to clipboard

Charts corrupted after opening and saving .xlsx file

Open MarcoBelluDev opened this issue 7 months ago • 7 comments

Hi Math,

first of all congratulation for the great project. 💯

I am having an annoying issue when using umya-spreadshit to open, edit and then save an .xlsx file. The original file has some charts. When I run my script, I modify some cells in the file and then overwrite the file.

Trying to open the fail again, I get the following errors from Excel and the charts are not present anymore. (sorry, text is in italian because of my excel language)

Image Image

Do you know why this happen? I would like to specify that the cells I am editing are not used in those charts. I really don't get why the charts get corrupted.

Regards, Marco

MarcoBelluDev avatar May 26 '25 12:05 MarcoBelluDev

@ROMA96x Thank you for contacting us. Perhaps the content of the loaded file contains data structures that are not expected by umya-spreadsheet. This is due to a lack of implementation in umya-spreadsheet.

If possible, please upload the file in which the error occurs. We will analyze the cause.

MathNya avatar May 27 '25 05:05 MathNya

Hi @MathNya ,

this is a sample of the file with random data.

As you can see, there are 2 sheets.
Second sheets contains some charts. If I open and save the file with umya-spreadsheet, the charts ends up being corrupted.

MarcoBelluDev avatar May 29 '25 10:05 MarcoBelluDev

@ROMA96x Thank you for the files. We have checked and found the same error here. We will address this in the next update.

MathNya avatar May 30 '25 06:05 MathNya

@MathNya thank you! 😀

MarcoBelluDev avatar May 30 '25 09:05 MarcoBelluDev

Fixed a bug. Please get the latest version.

MathNya avatar Jun 24 '25 05:06 MathNya

Hi @MathNya ,

thanks for the update! I just tested new version: now charts are not removed. 🥇

Anyhow, I noticed that there is still an issue related to cell-comments. These are still lost:

Removed records: Comments from part /xl/comments1.xml (Comments)
Removed records: Comments from part /xl/comments2.xml (Comments)

Do you prefer I open a new thread? Or we can use this one?

MarcoBelluDev avatar Jun 25 '25 08:06 MarcoBelluDev

@ROMA96x Thank you for confirming. The error regarding comments is probably another glitch. Please create a new Issue.

MathNya avatar Jun 25 '25 08:06 MathNya