Can You Translate a Macro-Enabled Excel Workbook?
Not directly, today. Lingivio accepts .xlsx and .ods workbooks. A macro-enabled .xlsm file, a binary .xlsb file and an old .xls file are refused at upload, before anything is translated or charged. Macro code is never sent for translation.
Published
What Happens When You Upload One
The upload is refused with this message. No credits are used:
Why Macro Code Is Not Translated
A macro is a program. Translation would change what it does. A macro that checks if a cell says Total stops working when that cell says something else. A translated variable name can stop the code completely.
For the same reason, formulas are not sent for translation. Translation changes words. Code and formulas are not words.
The Safe Way Today
- In Excel, save a copy of the workbook as an Excel Workbook (.xlsx). Excel warns that this format cannot keep the macros. Keep your original .xlsm file.
- Translate the .xlsx copy with Lingivio. Sheet names are not translated, so code that refers to a sheet by name still finds it.
- Open the translated workbook. Copy your modules from the original in the Visual Basic editor. Save the workbook as an Excel Macro-Enabled Workbook (.xlsm).
- Search the code for fixed words that it compares cells with, such as If Range("A1") = "Total". Those cells are translated now, so change each word to its translation.
If You Translate Macro Workbooks Often
Tell us which workbooks, and why. We decide on direct support for macro-enabled files from what people send.