> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.ollang.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export On-Screen Text XLSX

> Download the on-screen text (visual translation) of an order as an XLSX spreadsheet

Returns the same XLSX file as the dashboard's **On-Screen Text (XLSX)** download, for a CC, Subtitle or AI Dubbing order with visual translation enabled.

This is a different file from [Export Order XLSX](https://api-docs.ollang.com/apis/ollang-api-reference/export-order-xlsx.md), which exports the spoken subtitle segments.

The workbook has one sheet, named after the target language (for example `French`), with a frozen header row. Rows are sorted by start time:

| Column | Description |
| - | - |
| # | Row number |
| Start | Start time as `HH:MM:SS,mmm` |
| End | End time as `HH:MM:SS,mmm` |
| Original | On-screen text in the source language |
| Translation | Translated text (empty when not translated yet) |
| Target language | Target language name |

To read the rows as JSON instead, use [Get On-Screen Text](https://api-docs.ollang.com/apis/ollang-api-reference/get-order-on-screen-text.md).

```bash cURL theme={null}
curl -X GET "https://api-integration.ollang.com/integration/orders/60b8d6f1e1b9b1d8c6c0d8e1/on-screen-text/export-xlsx" \
  -H "X-Api-Key: $OLLANG_API_KEY" \
  --fail --output on_screen_text.xlsx
```

```javascript JavaScript theme={null}
import { writeFile } from "node:fs/promises";

const orderId = "60b8d6f1e1b9b1d8c6c0d8e1";

const response = await fetch(
  `https://api-integration.ollang.com/integration/orders/${orderId}/on-screen-text/export-xlsx`,
  { headers: { "X-Api-Key": process.env.OLLANG_API_KEY } },
);

if (!response.ok) throw new Error(await response.text());
await writeFile("on_screen_text.xlsx", Buffer.from(await response.arrayBuffer()));
```

```python Python theme={null}
import os
import requests

order_id = "60b8d6f1e1b9b1d8c6c0d8e1"

response = requests.get(
    f"https://api-integration.ollang.com/integration/orders/{order_id}/on-screen-text/export-xlsx",
    headers={"X-Api-Key": os.environ["OLLANG_API_KEY"]},
)
response.raise_for_status()

with open("on_screen_text.xlsx", "wb") as f:
    f.write(response.content)
```

## Authorizations

This endpoint requires API key authentication. Include your API key in the request header:

* **Header name**: `X-Api-Key`
* **Header value**: Your API key from the Ollang dashboard

## Path Parameters

**orderId** `string` *required*

The unique identifier of a CC, Subtitle or AI Dubbing order with visual translation enabled. The order must belong to the API key's client.

## Response

The response is a binary XLSX file download. The response headers include:

* `Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
* `Content-Disposition: attachment; filename="{OrderName}_on-screen-text.xlsx"; filename*=UTF-8''{OrderName}_on-screen-text.xlsx`

```text 200 theme={null}
Binary XLSX file (on-screen text rows)
```

```json 400 theme={null}
{
  "statusCode": 400,
  "message": "No on-screen text rows for this order"
}
```

```json 404 theme={null}
{
  "statusCode": 404,
  "message": "Order does not exist."
}
```

## Errors

| Status | When |
| - | - |
| 400 | Visual translation is off for the order, the order has no on-screen text rows yet, or the order type isn't CC, Subtitle or AI Dubbing. |
| 401 | The API key is missing or invalid. |
| 404 | The order doesn't exist or belongs to another client. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.