How do I make MS Excel macros work in Ubuntu?

Solution 1:

This is not an Ubuntu question per se, but might be something new users may struggle with. In principle Excel macros only run in Excel, the language was not conceived to be portable. Here's what, for instance, the LibreOffice help says about it:

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.

In essence if you want a portable programme you should program on a portable platform. I'd say you have two options:

  1. Ask the author of the code to provide it to you on another language or support (I assume you are not the author since you don't own Excel).
  2. Purchase Excel and run it on Wine or PlayOnLinux