This branch adds a sidebar UI to the Google Sheets DeepL integration. Select cells in your sheet, open the DeepL sidebar, choose your translation options, and click Translate — results are written back as plain text values, so they are never re-translated when the sheet is reopened.
Disclaimer: the DeepL support team does not provide support for this example project. If you have questions or feedback, please open a GitHub issue.
- A DeepL API authentication key. Create a free account here — the Free tier allows up to 500,000 characters/month.
- A Google account to use Google Sheets.
DeepL maintains a ready-to-use template Google Sheet with the script already embedded. No coding required.
- Open the DeepL for Google Sheets template.
- Click File → Make a copy. Give it a name and save it to your Drive.
- Open your copy and click DeepL → Open sidebar in the toolbar.
- Enter your DeepL API key when prompted. The sidebar verifies the key and takes you straight to the translation UI.
Use this if you want to add DeepL to an existing sheet, or prefer to install from source.
- In your Google Sheet, go to Extensions → Apps Script.
- Click + next to "Files", choose Script, name it
DeepLand paste in the contents of DeepL.gs. - Add another file, choose HTML, name it
DeepLSidebar, and paste in the contents of DeepLSidebar.html. Save the changes. - Close the Apps Script tab and reload your sheet. A DeepL menu will appear in the toolbar.
- Click DeepL → Open sidebar and enter your API key when prompted.
To check for updates, see the CHANGELOG. To update, open
Extensions → Apps Script and replace the contents of DeepL.gs and
DeepLSidebar.html with the latest versions (links above). Save and reload
your sheet. Your API key and saved options are stored in Script Properties and
are unaffected by updates.
-
Select one or more cells containing the text you want to translate.
-
Click DeepL → Open sidebar.
-
Set your options:
Options (always visible)
Option Description Source language Language of the input text. Leave as Auto-detect if unsure. Choose Other to enter any BCP-47 code. Target language Language to translate into. Choose Other to enter any BCP-47 code. Formality Default / Formal / Informal. A note appears when the target language does not support this setting. Context Optional hint to disambiguate the text (e.g. "product listing for a luxury watch"). Not translated. Customization (collapsible)
Option Description Glossary ID ID of a DeepL glossary to apply. Style rule ID ID of a DeepL style rule list to apply. Custom instructions Up to 10 plain-language instructions, one per line (e.g. "Use gender-neutral language"). Advanced (collapsible)
Option Description Model Default, Quality optimized, Prefer quality, or Speed optimized. Extra API options Additional DeepL API parameters as key=valuelines or a JSON object. -
Click Translate. Results are written back as plain text and will not be re-translated when the sheet is reopened.
All settings are saved and restored automatically between sessions.
The sidebar shows a usage bar for the current billing period, updated after each translation. Your API key can be replaced or cleared at any time from the Settings section at the bottom of the sidebar.
The installed version is shown in the sidebar footer and under DeepL → About.
The script still includes the former DeepLTranslate() and DeepLUsage() spreadsheet
formula functions, for backward compatibility. These are disabled by default — read
FORMULA_FUNCTIONS.md for usage details, cost implications,
and instructions to enable them.
We welcome feedback and contributions. Please open an issue or submit a pull request.