VSRonin / QtXlsxWriter

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

VBA will lose after write a xlsm type file #41

Closed liufeijin closed 5 years ago

liufeijin commented 5 years ago

XLSM type file contains VBA . if write it the VBA will lose as below red mark

XLSMFILE

the vbProject.bin is lost in xlsm zip file cloud you fix it? Many thanks

VSRonin commented 5 years ago

Every time this library writes a file, it will not edit the existing one but write it from scratch. So any feature present in the file before that are not supported by this library will be lost. As VBA code is not supported it will indeed not be inserted in the result. It is unlikely this will change in the future as the vba part of the file is still stored in the same way as pre-xlsx files and it's a proprietary binary format of Microsoft. https://github.com/jmcnamara/libxlsxwriter offers a way to insert an existing vbaProject.bin inside a xlsx file

liufeijin commented 5 years ago

Hi VSRonin Many thanks for your information . I have fixed it refer your information on QXlsx project https://github.com/QtExcel/QXlsx but i just completed the vba of thisworkbook. for each sheet VBA is not fixed still. If have a free time , will try to fix VBA of each sheet and printsetting bin file . best regards, jeff