Bug 144137 - LibreOffice Calc deletes macros from OnlyOffice when saving XLSX
Summary: LibreOffice Calc deletes macros from OnlyOffice when saving XLSX
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-27 21:06 UTC by vimu
Modified: 2021-08-31 09:05 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Testfile with onlyoffice macro (7.67 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-08-30 18:11 UTC, vimu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vimu 2021-08-27 21:06:09 UTC
I have XLSX files created with OnlyOffice/Nextcloud containing OnlyOffice macros.

After opening and saving the XLSX with LibreOffice calc, the macros are gone - when the file is opened with OnlyOffice.

MS Excel does not delete OnlyOffice macros.
Comment 1 Timur 2021-08-29 08:17:28 UTC
Please attach the file. And try to save as Xlsm, format for saving macros. And test all from LO in MSO.
Comment 2 vimu 2021-08-30 18:11:35 UTC
Created attachment 174649 [details]
Testfile with onlyoffice macro
Comment 3 vimu 2021-08-30 18:17:41 UTC
(In reply to Timur from comment #1)
> Please attach the file. And try to save as Xlsm, format for saving macros.
> And test all from LO in MSO.

Example-file with an OnlyOffice Macro has been attached.
OnlyOffice uses Open XML format to my understanding.

The Macros seems to be in the jsaProject.bin file.

*.xlsm is not supported by OnlyOffice.
Comment 4 QA Administrators 2021-08-31 03:56:12 UTC Comment hidden (obsolete)
Comment 5 Timur 2021-08-31 07:41:38 UTC
In general, XLSM is for VBA and this seems like JavaScript macro.

Findings:
- OnlyOffice doesn't support proper format XLSM so it saves macro in XLSX;
- MSO doesn't see and run that macro, but it leaves it unchanged on save to XLSX;
- LO doesn't edit or run that macro, and it doesn't save it.

I think this (fileopen issue) is NotOurBug, OnlyOffice should save it properly. 
I don't think it's worth a bug to make a workaround of keeping that unknown content. 

This report prompted me to test saving to XLS* of javascript macro and it doesn't work. But I'll open a new bug from example in bug 118440.
Comment 6 vimu 2021-08-31 08:43:25 UTC
Thanks.

Is LO generally removing all "unknown" items from its files?

I think the MSO behavior would make users more happy.

Any chance to reconsider this NotOurBug-decision?

If I report the problem at OnlyOffice, they might say the MSO is doing it right and that LO should get it right...
Comment 7 Timur 2021-08-31 09:05:08 UTC
MSO is not doing right, it doesn't see that macro, and that was the main drive to put NOB.
So I guess that bug should be reported to OnlyOffice to fix that and after that please set this one Unconfirmed with new file.