The Macro Converter is an add-on that makes it easier to convert Excel files that have Visual Basic for Applications (VBA) code to Google Sheets files and Apps Script. You can use the Macro Converter add-on to determine the compatibility of your files and automatically convert them.
Before you begin
To use the Macro Converter:
- You must have a Google Workspace Enterprise Plus account or a Google Workspace for Education Plus account.
- You should have some proficiency with Excel or Google Sheets and scripting languages (VBA or Apps Script).
- You should be able to read and understand basic scripts.
Install the Macro Converter add-on
- On your computer, go to the Macro Converter add-on on Google Workspace Marketplace.
- At the top right, click Install > Continue > Allow.
- Installation might take several seconds. Once the add-on is installed, click Done.
Once installed, you can find the Macro Converter add-on in Google Drive, on the right side panel. If you don’t see the side panel, at the bottom right, click Show side panel .
How to use the Macro Converter
- Generate a compatibility report for the files you want to convert. See Determine if VBA macros are compatible with Apps Script.
- Update your VBA code using the information from your compatibility report.
- If your code is fully compatible, you might not need to make changes.
- If your VBA code has APIs that won’t easily convert to Apps Script code, the report offers workarounds in Apps Script. You can implement the Apps Script workarounds after you convert your files, but if you’re more familiar with VBA you might want to create and implement VBA workarounds before you convert your files.
- After you make changes to your VBA code, run the compatibility report again. This step helps confirm the increased compatibility of your files and flags any additional updates that should be made.
- Repeat steps 2 and 3 as needed. These steps maximize the compatibility of your files to reduce the amount of work needed after you convert them. You can proceed to the next step if you plan to finish applying your workarounds after you convert your files.
- Convert your files.
- Fix errors. You might need to make adjustments to your new Apps Script code to make sure your code works as intended.
- Address common issues. You might need to manually create items, like VBA UserForms, in Apps Script.
Related articles
- Determine if VBA macros are compatible
- Convert VBA macros to Apps Script
- Fix errors in your converted code
- Address common issues
- Watch Macro Converter tutorials
- List of compatible VBA APIs