# getDataAsExcel

Generates XLSX content as Uint8Array bytes for app attachments, uploads, and similar uses.

Canonical: https://grid.syidax.com/docs/methods/getDataAsExcel/

<a id="meaning"></a>

## What does this API do?

Generates XLSX content as Uint8Array bytes for app attachments, uploads, and similar uses.

API for Pro features: Built-in Excel export

<a id="contract"></a>

## Exact input and result types

```typescript
getDataAsExcel(options?: {
      sheetName?: string;
      onlySelected?: boolean;
      columnKeys?: readonly string[];
      skipHeaders?: boolean;
    }): Promise<Uint8Array>
```

| Arguments | Required | Type |
| --- | --- | --- |
| options | Optional | {<br>      sheetName?: string;<br>      onlySelected?: boolean;<br>      columnKeys?: readonly string[];<br>      skipHeaders?: boolean;<br>    } |

The return type is `Promise<Uint8Array>`.

<a id="usage"></a>

## Usage flow

After registering and initializing the Grid element, call grid.getDataAsExcel(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.

<a id="recipes"></a>

## Feature explanations and examples

- [Excel export](https://grid.syidax.com/docs/features/excel-export.md) — Excel export generates XLSX bytes or downloads a file. This Pro feature suits exchanges requiring sheet names and workbook format beyond CSV.
