Bug 149560 - Excel Visual Basic compatibility issue in LibreOffice Calc: Round trip produces a corrupt xls file
Summary: Excel Visual Basic compatibility issue in LibreOffice Calc: Round trip produc...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: QA:needsComment
Keywords:
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
 
Reported: 2022-06-14 08:32 UTC by Óvári
Modified: 2022-06-29 03:39 UTC (History)
0 users

See Also:
Crash report or crash signature:
Regression By:


Attachments
button2macro.xls (44.50 KB, application/vnd.ms-excel)
2022-06-14 08:34 UTC, Óvári
Details
button2macro.ods (11.78 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-06-14 08:35 UTC, Óvári
Details
button2macroback.xls (8.50 KB, application/vnd.ms-excel)
2022-06-14 08:35 UTC, Óvári
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Óvári 2022-06-14 08:32:22 UTC
Description:
Using LibreOffice Calc, a round trip from .xls to .ods to .xls doesn't work for a Excel spreadsheet with a simple button which runs a subroutine that shows a message box.

Steps to Reproduce:
An Excel button2macro.xls spreadsheet file with a button that runs macro
MsgBox "Hello World!"

With LibreOffice Calc, save the button2macro.xls file as button2macro.ods.
Clicking the "Button 1" shows the "Hello World!" dialog box.

Close LibreOffice.

With LibreOffice Calc, save the button2macro.ods file as button2macroback.xls.

Open the button2macroback.xls with Microsoft Excel 2010 and a dialog shows with a message:
```
Office has detected a problem with this file. To help
protect your computer this file cannot be opened.
```

LibreOffice Calc 7.3.4.2 opens the button2macroback.xls file and it works most of the time; however, there was a time when the file opened and the button was clicked and it didn't work with the message:
```
A Scripting Framework error occurred while running the UNKNOWN script UNKNOWN.

Message: Incorrecct format for Script URI: /run/build/libreoffice/scripting/source/provider/MasterScriptProvider.css:238
```
Perhaps the MasterScriptProvider.css:238 can help with finding a solution so a round trip of a VBA file is achievable.

Actual Results:
Open the button2macroback.xls with Microsoft Excel 2010 and a dialog shows with a message:
```
Office has detected a problem with this file. To help
protect your computer this file cannot be opened.
```

Expected Results:
The button2macroback.xls spreadsheet file should be able to be opened with Microsoft Excel 2010.


Reproducible: Always


User Profile Reset: No



Additional Info:
The Excel button2macro.xls spreadsheet file will be attached as later as unsure how to attach it now.

Will help with bug 149325.

Thank you
Comment 1 Óvári 2022-06-14 08:34:30 UTC
Created attachment 180746 [details]
button2macro.xls
Comment 2 Óvári 2022-06-14 08:35:04 UTC
Created attachment 180747 [details]
button2macro.ods
Comment 3 Óvári 2022-06-14 08:35:28 UTC
Created attachment 180748 [details]
button2macroback.xls