excel-translator
Translates Excel (.xlsx) files from English to Chinese while preserving all formatting, images, and charts.
Introduction
The Excel Translator skill is a specialized utility designed for seamless bilingual document processing. It automates the translation of English content within .xlsx files into Chinese, ensuring that the visual integrity and structure of the original spreadsheets remain intact. This tool is ideal for project managers, administrative assistants, and global teams who need to localize reports, data tables, or business documents without manually editing each cell or losing complex design elements like merged cells, colors, and charts.
-
Powered by openpyxl for reliable, native Excel file manipulation and format preservation.
-
Uses the OpenAI API to perform high-quality natural language translations while maintaining context.
-
Injects the Chinese translation directly below the original English text within the same cell using a newline separator, facilitating side-by-side comparison.
-
Automatically preserves cell styles, font weights, colors, and embedded media, such as images and graphical charts.
-
Supports bulk processing of entire workbooks, scanning every sheet for English text content.
-
The script requires the OPENAI_API_KEY environment variable to be configured correctly in the sandbox.
-
By default, output files are generated with a _translated suffix in the source directory; users can specify custom output paths using the -o flag.
-
For optimal results, ensure the input Excel files are well-structured and avoid password protection.
-
This tool is intended for translation tasks; if the workbook contains complex macros or VBA scripts, their functionality may not be verified by this utility.
-
Users should ensure their API credentials have sufficient balance and permission to access the translation models used by the script.
Repository Stats
- Stars
- 4,441
- Forks
- 1,205
- Open Issues
- 7
- Language
- Python
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 29, 2026, 02:28 PM