# exportDataAsExcel

Downloads an XLSX file using the specified sheet name, columns, and selection conditions.

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

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

## What does this API do?

Downloads an XLSX file using the specified sheet name, columns, and selection conditions.

API for Pro features: Built-in Excel export

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

## Exact input and result types

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

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

The return type is `Promise<void>`.

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

## Usage flow

After registering and initializing the Grid element, call grid.exportDataAsExcel(…). 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.
