https://github.com/yaza-putu/google-sheets-translator
This project allows you to translate an Excel file across all sheets using Google Spreadsheetโs built-in translation features, eliminating the need for manual translation. With just one click, all sheets are translated automatically.
https://github.com/yaza-putu/google-sheets-translator
auto-translation excel-translation google-sheet google-sheet-translation translation
Last synced: about 1 month ago
JSON representation
This project allows you to translate an Excel file across all sheets using Google Spreadsheetโs built-in translation features, eliminating the need for manual translation. With just one click, all sheets are translated automatically.
- Host: GitHub
- URL: https://github.com/yaza-putu/google-sheets-translator
- Owner: yaza-putu
- License: mit
- Created: 2025-12-20T06:53:48.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2026-01-10T11:13:42.000Z (6 months ago)
- Last Synced: 2026-01-11T03:33:37.511Z (6 months ago)
- Topics: auto-translation, excel-translation, google-sheet, google-sheet-translation, translation
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Auto Translate Google Sheets
Automatically translate Google Sheets to any language and download as Excel.
---
## ๐ Table of Contents
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Language Codes](#language-codes)
- [Troubleshooting](#troubleshooting)
- [FAQ](#faq)
---
## โจ Features
- โ
Translate single sheet or all sheets at once
- โ
Create new sheet/file to keep original data safe
- โ
Support 100+ languages
- โ
100% free (uses built-in Google Translate API)
- โ
Export results to Excel (.xlsx)
- โ
No external API key required
---
## ๐ฆ Installation
### Step 1: Prepare Your Google Sheets File
**Option A - Upload Excel File:**
1. Go to `drive.google.com`
2. Click **"+ New"** โ **"File upload"**
3. Upload your Excel file
4. Right-click the file โ **"Open with"** โ **"Google Sheets"**
5. **IMPORTANT:** Click **File** โ **"Save as Google Sheets"**
- This converts Excel to Google Sheets format
- **Extensions menu will NOT appear** without this step!
**Option B - Create New File:**
1. Go to `sheets.google.com`
2. Click **"+ Blank"** to create a new spreadsheet
**Option C - Use Existing File:**
1. Go to `sheets.google.com`
2. Click the file you want to translate
3. If file is in Excel format (.xlsx), click **File** โ **"Save as Google Sheets"** first
> โ ๏ธ **CRITICAL:** If you don't see the **Extensions** menu, you MUST convert the file to Google Sheets format first by clicking **File โ Save as Google Sheets**!
### Step 2: Open Apps Script Editor
1. In Google Sheets, click the **Extensions** menu
- If you don't see **Extensions** menu, go to **File โ Save as Google Sheets** first!
2. Select **Apps Script**
3. A new tab will open (Apps Script Editor)
### Step 3: Paste Script
1. In Apps Script Editor, **delete all default code**
2. **Copy the script** provided (see `Code.gs` file)
3. **Paste** into the editor (Ctrl+V)
4. Click **Save** (๐พ or Ctrl+S)
5. Name your project: `Auto Translator`
### Step 4: Run Script (IMPORTANT!)
1. In Apps Script Editor, make sure **`onOpen`** function is selected in the dropdown (top center)
2. Click the **Run** button (โถ๏ธ)
3. An **"Authorization required"** dialog will appear
4. Click **"Review Permissions"**
5. Choose your Google account
6. Click **"Advanced"** (bottom left)
7. Click **"Go to Auto Translator (unsafe)"**
8. Click **"Allow"**
> **Note:** This is normal for custom scripts. Google warns you because it's not a verified app.
### Step 5: Verify Menu Appears
1. **Go back to Google Sheets tab**
2. **Refresh the page** (F5)
3. Wait a few seconds
4. The **"๐ Auto Translate"** menu will appear in the toolbar (between Extensions and Help)
โ
**Installation complete!**
---
## ๐ Usage
### Available Menu Options
After installation, you'll see the **"๐ Auto Translate"** menu with options:
- **๐ Translate This Sheet** - Translate active sheet (overwrites original data)
- **๐ Translate to New Sheet** - Translate active sheet to new sheet (original data safe)
- **๐ Translate ALL Tabs** - Translate all sheets (overwrites original data)
- **๐ Translate ALL Tabs to New File** - Translate all sheets to new file (SAFEST โญ)
- **โ๏ธ Language Settings** - View language code list
- **๐ฅ Export to Excel** - Generate Excel download link
---
### ๐ Method 1: Translate ALL Tabs to New File (RECOMMENDED)
**This method is safest because the original file remains unchanged!**
#### Steps:
1. Click **"๐ Auto Translate"** menu
2. Select **"๐ Translate ALL Tabs to New File"**
3. Enter **target language code** (example: `en` for English)
4. Click **"OK"**
5. Wait for the process to complete (2-5 minutes depending on file size)
- โ ๏ธ **DO NOT close the browser tab**
- โ ๏ธ **DO NOT refresh the page**
6. A new file will automatically open in a new tab
7. File name: `[Original File Name] (EN)`
#### Download as Excel:
1. In the translated file, click **"File"** menu
2. Select **"Download"** โ **"Microsoft Excel (.xlsx)"**
3. File will download to your computer
โ
**Done!**
---
### โก Method 2: Translate 1 Sheet to New Sheet
**Perfect when you only want to translate a specific tab**
#### Steps:
1. **Select the tab/sheet** you want to translate
2. Click **"๐ Auto Translate"** menu
3. Select **"๐ Translate to New Sheet"**
4. Enter **language code** (example: `en`)
5. Click **"OK"**
6. A new sheet will be created with name: `[Sheet Name]_EN`
7. You'll be automatically switched to the translated sheet
---
### ๐ฅ Method 3: Translate Directly (Overwrite)
**โ ๏ธ WARNING: Original data will be overwritten! Use only if you're sure.**
#### For 1 Sheet:
1. Select the sheet you want to translate
2. Click **"๐ Auto Translate"** โ **"๐ Translate This Sheet"**
3. Confirm **"Yes"** (data will be overwritten)
4. Enter language code
5. Click **"OK"**
#### For ALL Sheets:
1. Click **"๐ Auto Translate"** โ **"๐ Translate ALL Tabs"**
2. Confirm **"Yes"** (data in all tabs will be overwritten)
3. Enter language code
4. Click **"OK"**
---
## ๐ Language Codes
### Popular Languages
| Code | Language | Emoji |
|------|----------|-------|
| `en` | English | ๐ฌ๐ง |
| `id` | Indonesian | ๐ฎ๐ฉ |
| `ja` | Japanese | ๐ฏ๐ต |
| `ko` | Korean | ๐ฐ๐ท |
| `zh` | Chinese (Mandarin) | ๐จ๐ณ |
| `ar` | Arabic | ๐ธ๐ฆ |
| `es` | Spanish | ๐ช๐ธ |
| `fr` | French | ๐ซ๐ท |
| `de` | German | ๐ฉ๐ช |
| `pt` | Portuguese | ๐ต๐น |
| `ru` | Russian | ๐ท๐บ |
| `it` | Italian | ๐ฎ๐น |
| `nl` | Dutch | ๐ณ๐ฑ |
| `th` | Thai | ๐น๐ญ |
| `vi` | Vietnamese | ๐ป๐ณ |
| `tl` | Tagalog | ๐ต๐ญ |
| `hi` | Hindi | ๐ฎ๐ณ |
| `bn` | Bengali | ๐ง๐ฉ |
### View Complete List
1. Click **"๐ Auto Translate"** menu
2. Select **"โ๏ธ Language Settings"**
3. A dialog will show the language code list
Or visit: https://cloud.google.com/translate/docs/languages
---
## ๐ง Troubleshooting
### โ "Extensions" menu not visible
**Cause:** File is in Excel format (.xlsx), not Google Sheets format
**Solution:**
1. Click **File** menu
2. Select **"Save as Google Sheets"**
3. Wait for conversion to complete
4. **Extensions** menu will now appear
5. Continue with Apps Script installation
### โ "Auto Translate" menu not appearing
**Cause:** Script hasn't been run or hasn't loaded
**Solution:**
1. Open **Extensions** โ **Apps Script**
2. Select **`onOpen`** function in dropdown
3. Click **Run** button (โถ๏ธ)
4. Go back to Google Sheets
5. Refresh page (F5)
6. Wait 10-15 seconds
### โ Error: "Authorization required"
**Cause:** Script needs permission on first run
**Solution:**
1. Click **"Review Permissions"**
2. Choose your Google account
3. Click **"Advanced"**
4. Click **"Go to Auto Translator (unsafe)"**
5. Click **"Allow"**
> This is normal for custom scripts. The script only runs in your account and doesn't share data with third parties.
### โ Translation process too slow / stuck
**Cause:** Large files require more time
**Solution:**
- Files >1000 rows may take 5-10 minutes
- **DO NOT close tab** or refresh page
- Wait until "โ
Done!" notification appears
- If longer than 15 minutes, try translating per sheet
### โ Some cells not translated
**Cause:**
- Cell contains numbers (no translation needed)
- Cell contains formulas (not translated)
- Cell is empty
- Temporary API connection error
**Solution:**
- This is normal and by design
- Formulas and numbers are not translated
- For connection errors, try running again
### โ Script error / not working
**Solution:**
1. Ensure script is completely copied (not truncated)
2. Open Apps Script โ check for red errors
3. Delete script and paste again
4. Save โ Run โ Refresh
---
## ๐ก Tips & Best Practices
### โจ Tip 1: Backup First!
Before translating, make a copy of the original file:
- **File** โ **Make a copy**
- Name it `BACKUP - [file name]`
### โจ Tip 2: Test with 1 Sheet First
Before translating all tabs, test with 1 sheet to check results
### โจ Tip 3: Use "to New File/Sheet" Options
Always use options that create new file/sheet to keep original data safe
### โจ Tip 4: Translate Gradually
For very large files (>5000 rows), translate per sheet or in batches
### โจ Tip 5: Check Results
After translation, randomly check several rows to ensure accuracy
### โจ Tip 6: Stable Internet Connection
Ensure stable internet connection during translation process
---
### โ ๏ธ Disclaimer & Important Notes
Before using this script, please consider the following:
- **Backup Recommended**
It is strongly recommended to create a backup copy of your Google Sheets data before running this script.
- **Sensitive Data**
If your document contains confidential or sensitive information, consider carefully before using cloud-based automation. Any security risks or data errors remain the userโs responsibility.
- **Official Google Features**
This script uses `LanguageApp` or the `GOOGLETRANSLATE` function, which are official built-in Google features.
It is **not a third-party application** and is **not affiliated with or endorsed by Google**.
- **Educational & Reference Purpose**
This script is provided for educational and reference purposes only.
The author is not responsible for any data loss, corruption, or errors that may occur from using this script.
This project uses Google Apps Script and Google Translate services.
This project is not affiliated with or endorsed by Google.
Users are responsible for complying with Google's Terms of Service.
## ๐ Changelog
### Version 1.0 (2024)
- Initial release
- Support translate single sheet or all sheets
- Support translate to new sheet/file
- Export to Excel
- 100+ language support
---
## ๐ License
Free to use. No warranty provided.
---
## โ
Quick Checklist
Before starting, ensure:
- [ ] File is in Google Sheets (not local Excel)
- [ ] If Excel format, converted via **File โ Save as Google Sheets**
- [ ] **Extensions** menu is visible
- [ ] Script pasted in Apps Script
- [ ] Script saved
- [ ] Script **Run** (important!)
- [ ] Page refreshed
- [ ] "๐ Auto Translate" menu appears
- [ ] Know target language code (e.g., `en`)
- [ ] Stable internet connection
**If all checkboxes โ
, you're ready to translate!**
---
## ๐ Happy Translating!
**Fastest Workflow:**
1. Upload file to Google Sheets
2. If Excel format: **File โ Save as Google Sheets**
3. Install script โ Run โ Refresh
4. Click "Translate ALL Tabs to New File"
5. Enter language code โ OK
6. Download result as Excel
7. Done! ๐
---
**Made with โค๏ธ using Google Apps Script**