QtXlsxWriter icon indicating copy to clipboard operation
QtXlsxWriter copied to clipboard

Resetting chart style from premade template when modifying in program

Open Adriantega12 opened this issue 6 years ago • 2 comments

Hello everyone! Really happy about something like QXlsx existing but it seems to have an issue when modifying an existing file.

I have this template I made so I can modify it when needed and save it as a new file, but it seems that when loading it, QXlsx resets the style on my premade charts. (The template exists in first place so I can just insert data using code and the user can visualize the info dump later in the xlsx)

Is there a way around this or a fix coming? Is there a way I can contribute to help fixing this? (As it is in my best interest)

Template: imagen Modified: imagen

Thanks in advance!

Adriantega12 avatar Jun 21 '18 01:06 Adriantega12

This happens because this library will actually re-create the file from scratch and anything that is not supported will be lost.

As a workaround you could open your previous file as a zip archive, save the contents of xl\charts\, edit the file using qxlsx, reopen the file as a zip and overwrite those files. Having said that, this workaround only works for very simple charts, anything a bit involved might fail

VSRonin avatar Jun 21 '18 09:06 VSRonin

@VSRonin Great! I'll try that and get back to you.

Adriantega12 avatar Jun 22 '18 14:06 Adriantega12