VSRonin / QtXlsxWriter

.xlsx file reader and writer for Qt5
http://qtxlsx.debao.me
209 stars 73 forks source link

Resetting chart style from premade template when modifying in program #27

Open Adriantega12 opened 6 years ago

Adriantega12 commented 6 years ago

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!

VSRonin commented 6 years ago

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

Adriantega12 commented 6 years ago

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