How to Translate an Entire Spreadsheet Using Aspose.Cells Cloud AI Translation API
The TranslateSpreadsheet endpoint reads every text element in a workbook, sends the content to an AI‑powered translation service, and returns a new spreadsheet file where all textual data is rendered in the specified target language. The operation keeps the original layout, cell styles, formulas, and multi‑sheet structure intact, making it ideal for globalizing reports, dashboards, and data‑driven documents. Supported file formats include XLS, XLSX, XLSM, CSV, and ODS. Errors are returned for invalid language codes, authentication failures, or translation service outages.
Translate Spreadsheet API
API Endpoint
PUT https://api.aspose.cloud/v4.0/cells/ai/translate/spreadsheet
Request Parameters:
| Parameter Name | Type | Location | Required/Optional | Description |
|---|---|---|---|---|
| Spreadsheet | File | Required | FormData | The Excel workbook to be translated. Acceptable extensions: .xls, .xlsx, .xlsm, .csv, .ods. Maximum file size: 50 MB. Example: budget.xlsx. |
| targetLanguage | string | Required | Query | ISO 639‑1 language code for the desired output language (e.g., “es” for Spanish, “fr” for French, “de” for German). Must be a language supported by the underlying AI service. |
| region | string | Optional | Query | Spreadsheet region identifier that influences locale‑specific formatting such as dates, numbers, and currency. Common values: “US”, “EU”, “CN”. If omitted, the workbook’s original region setting is used. |
| password | string | Optional | Query | Password for opening a protected workbook. Leave blank when the file is not password‑protected. |
Response
Successful response (200 OK)
Headers:
Content-Type: application/octet-stream // or text/csv when CSV output is requested
Content-Disposition: attachment; filename=“translated.xlsx”
Content-Length:
Error responses follow the standard Aspose.Cells Cloud error model (application/json) with fields code, message, and optional details.
Error Codes
- 400 Bad Request: Invalid Aspose.Cells Cloud API URI.
- 401 Unauthorized: Invalid access token. Or invalid client id and secret.
- 404 Not Found: The spreadsheet file not accessible.
- 500 Server Error: The spreadsheet has encountered an anomaly in obtaining calculation data.
Where should we use the Translate Spreadsheet API?
- International Financial Reporting – Convert quarterly Excel reports into multiple languages for regional offices while preserving formulas and chart layouts.
- Multi‑language Marketing Dashboards – Automatically generate localized versions of sales performance dashboards for global teams.
- Educational Content Distribution – Translate grade‑books, assignment sheets, or curriculum spreadsheets for students in different countries without manual copy‑pasting.
- Regulatory Compliance – Produce language‑specific compliance spreadsheets that retain validation rules and data‑validation lists.
Why should you use the Translate Spreadsheet API?
- AI‑driven accuracy – Leverages state‑of‑the‑art neural translation models for context‑aware, high‑quality language conversion.
- Zero layout disruption – Keeps cell formulas, conditional formatting, charts, and worksheet ordering exactly as in the source file.
- Single‑call multi‑sheet processing – Translates every worksheet in one request, eliminating the need for per‑sheet loops.
- Seamless cloud integration – Works with Aspose.Cells Cloud authentication, enabling automated pipelines in CI/CD, serverless functions, or enterprise back‑ends.
How to Use the Translate Spreadsheet API with SDKs
Translate Spreadsheet API Specification
The Translate Spreadsheet API Specification provides a publicly accessible programming interface for executing REST interactions directly from a web browser.
Excel API SDK
Use Aspose.Cells Cloud SDKs
Using the SDK is the fastest way to develop, as it abstracts away the low-level details, allowing you to merge a spreadsheet into another spreadsheet with short code. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs. The following code examples demonstrate how to interact with Aspose.Cells web services using various SDKs: