Forum Discussion

James_Price's avatar
James_Price
Brass Contributor
May 24, 2023
Solved

Excel Online: replacement for VBA macros...

Hi team Like lots of others, I have a wide range of Excel macros that are not going to work in Excel Online.  On the web I've read I can use scripting, JavaScript and Python.   Does anyone know if ...
  • NikolinoDE's avatar
    May 24, 2023

    James_Price 

    Let's explore the options you mentioned:

    1. Scripting: In Excel Online, you can use the built-in scripting capabilities provided by Microsoft. Scripting allows you to automate repetitive tasks and perform custom operations on your Excel data. It provides a set of JavaScript-based APIs that you can use to manipulate the Excel workbook, worksheets, ranges, and more. With scripting, you can automate tasks, create custom functions, and build interactive user interfaces within the Excel Online environment.
    2. JavaScript: JavaScript is a widely used programming language and can be used in combination with Excel Online to automate tasks and enhance functionality. You can use JavaScript to interact with the Excel Online APIs and perform operations such as reading and writing data, formatting cells, creating charts, and more. JavaScript offers flexibility and compatibility across different platforms, making it a good choice for extending Excel Online's capabilities.
    3. Python: Although Python is not directly integrated into Excel Online, you can leverage it in conjunction with other tools to automate Excel-related tasks. For example, you can use libraries such as pandas and openpyxl to read and write Excel files, perform data analysis, and generate reports. Python offers a wide range of libraries and a large community, making it a popular choice for data manipulation and analysis tasks.
    4. VBA: Although you can't create, run, or edit VBA (Visual Basic for Applications) macros in Excel for the web, you can open and edit a workbook that contains macros. Any existing macros will remain in the workbook, and you can open the workbook in the Excel desktop app to view and edit the macros.

     

    Ultimately, the choice between scripting with JavaScript or using Python or VBA depends on the specific requirements of your macros and the level of integration needed with Excel Online.

    Whatever the choice of torment is yours :).

Resources