What happens to Excel macros when you open an .xlsm in Google Sheets

Published 25 October 2026. Checked against Google's documentation on 25 October 2026.

Google Sheets will open an .xlsm, the macro-enabled Excel format. It will not run the VBA inside it. Sheets automates with Apps Script, which is JavaScript (the V8 runtime), and even the macros you record in Sheets are Apps Script functions, saved in a script bound to the spreadsheet (Google Sheets macros). Google's own tool for VBA, the Macro Converter, exists to "convert Excel files that have Visual Basic for Applications (VBA) code to Sheets files and Apps Script". That rewrite is the job, whoever does it.

Two ways to open an .xlsm in Google Sheets

  1. Import it as a Google Sheet. Google's import help lists .xlsm among the file types Sheets imports, with .xls (if newer than Office 95), .xlsx, .xlt, .xltx and .xltm, and the file must not be password-protected. In Sheets, choose File > Import, pick the file, then an import option such as "Create new spreadsheet". The result is a Google Sheet, which can hold Apps Script but not VBA.
  2. Open it as an Office file. Google Drive's Office editing opens .xlsm ("macro enabled Excel files") and saves your changes back to the original Office file. Google says some Sheets features, Apps Script among them, are not available in Office editing, and that other features may be lost or altered, with a notice in the file when that will happen. To turn it into a Google Sheet, choose File > Save as Google Sheets.

Neither of Google's lists includes .xlsb, the binary Excel format. Open one of those in Excel and save it as .xlsm first.

What happens to the macros

Whichever way you open the file, the VBA does not run in Google Sheets. Whatever the macros did, from a button, when the workbook opened, when a cell changed or through a UserForm, stops happening until it is rewritten in Apps Script. Some of it has a direct equivalent; some has none (which VBA features don't work in Google Sheets).

Keep an untouched copy of the .xlsm. It holds the only working version of the macros, and it is what every converted macro is tested against. Because Office editing saves changes to the original file and may lose or alter features, edit a copy, never the only one.

What to do next

  1. List what the macros do. Each macro, what starts it, and what it touches outside the workbook: email, files on the PC, a database, another Office program. Those outside connections decide how hard the conversion is.
  2. Check your plan. Google's Macro Converter needs Workspace Enterprise Plus or Education Plus; the alternatives without it.
  3. Convert, or have it converted. How to convert Excel VBA to Apps Script maps the common pieces, and converting a UserForm covers the part Google's converter leaves to a person.

Sources

Google's documentation, read on 25 October 2026. Google updates these pages; if one now says something different, it wins.

More guides