https://bugs.documentfoundation.org/show_bug.cgi?id=172748
--- Comment #7 from [email protected] --- (In reply to Neil Roberts from comment #6) > (In reply to Dmitry.Kulikov from comment #5) > > > Then the user opens the .xlsm files in LibreOffice, starts writing macros, > > these macros run, make some changes to the file, and then the user simply > > presses Ctrl+S, saving the file in the same .xlsm format. The next time the > > user wants to make new changes to the file, for example, edit their macros, > > opens it, and the macros are gone. In this scenario, it doesn't matter that > > the macros are incompatible with Excel, since the user is working in > > LibreOffice. That's why it's crucial, at a minimum, to preserve macros when > > saving as an .xlsm file. > > As you described with the “inconsistent behaviour” in comment #0, in this > situation when opening and editing an existing xlsm document, the macros > *are* already correctly saved because the macros will be given the VBA > metadata during import. So there is no problem in this example scenario. This is precisely the problem: if you convert an .xlsx file to an .xlsm file or create an .xlsm file from scratch without adding any macros, the archive will be missing the xl/vbaProject.bin file, and this will cause all user-written macros in LibreOffice to be lost. My comment #0 specifically describes the situation with existing .xlsm macros: if macros already exist in the .xlsm file, then macros written in LibreOffice will not be lost and will be saved correctly. -- You are receiving this mail because: You are the assignee for the bug.
