Macro's



arochester

Moderator
Staff member
Gold Supporter
Credits
2,109
Been away experimenting.
I use Chromium as a browser.
Added app "Excel Online".
Clicked "Open from OneDrive"
Uploaded .xls to My Drive
Yes, I can enter and manipulate data in browser.
 

Nobby Hall

Member
Credits
0
After you confusing macros with formulas? They are quite different.
No the formulas are straight forward but i need the Macros to run in Libra Office. I have been reliably informed you cannot run the same macros that were run in Excell.
 

Nobby Hall

Member
Credits
0
Been away experimenting.
I use Chromium as a browser.
Added app "Excel Online".
Clicked "Open from OneDrive"
Uploaded .xls to My Drive
Yes, I can enter and manipulate data in browser.
I can copy and paste data across the two types, XLS and ODS, but Macros are "Dead" in ODS
 

atanere

Well-Known Member
Credits
0
I can copy and paste data across the two types, XLS and ODS, but Macros are "Dead" in ODS
I don't think the data types matter so much, XLS versus ODS... it is the code/scripting techniques (as you have found) that are the big problem. LibreOffice will open XLS files but not the Excel native VBA macro code. If you convert all of the macros to the LibreOffice Calc macro code, you could save it as an XLS format file... and Excel would open it, but then Excel would not be able to run the macro code after the conversion.

I'd love to see you able to switch to LibreOffice, but I'm not sure that will be possible. If the original XLS spreadsheet stays static and unchanging for long periods, you might could convert or re-create all the macros and make a working ODS/XLS copy for Calc.... but is it worth it to do that? And if the original spreadsheet changes, then the LibreOffice copy would need revision each time.

@JasKinasis (and some others here) know much more about these things, so maybe they will have some better suggestions. Long ago I switched from Excel to Calc for a complicated pay calculator (to check my own pay)... but I leave it as a XLS format that still works in Excel for the formulas so I can share the calculator with coworkers. But a couple of minor unnecessary macros were not compatible.

Sorry I can't help more, Nobby! I'm off to bed... one more midnight shift tonight... then vacation! :D

Cheers
Stan
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Credits
10,019
Can't help with the macros, but I love the new signature, Nobby :)
 

arochester

Moderator
Staff member
Gold Supporter
Credits
2,109
Did you see this?
Macros in Microsoft Office and LibreOffice
With a few exceptions, Microsoft Office and LibreOffice cannot run the same macro code. Microsoft Office uses VBA (Visual Basic for Applications) code, and LibreOffice uses Basic code based on the LibreOffice API (Application Program Interface) environment. Although the programming language is the same, the objects and methods are different.

The most recent versions of LibreOffice can run some Excel Visual Basic scripts if you enable this feature at Tools - Options' - Load/Save - VBA Properties'.
If you use macros in one of the applications and want to use the same functionality in the other application, you must edit the macros. LibreOffice can load the macros that are contained within Microsoft Office files and you can then view and edit the macro code in the LibreOffice Basic IDE editor.

You can choose to preserve or delete VBA macros
Open a Microsoft Office document that contains VBA macro code. Change only the normal contents (text, cells, graphics), and do not edit the macros. Save the document as a Microsoft Office file type. Open the file in Microsoft Office, and the VBA macros will run as before.

You may delete the VBA macros from the Microsoft Office file on loading or on saving.

  1. Choose 'Tools - Options' - Load/Save - VBA Properties to set the VBA macro handling of LibreOffice.
Source - https://help.libreoffice.org/Common/Using_Microsoft_Office_and
 


Latest posts

Top