# Excel Export
URL: https://pro.rv-grid.com/guides/excel-export/
Source: src/content/docs/guides/excel-export/index.mdx
Description: Export XLSX files and import CSV data with RevoGrid Pro.
RevoGrid Pro exports grid data to `.xlsx` workbooks through `ExportExcelPlugin`. The same plugin also keeps the historical CSV drag-and-drop import path, so existing integrations can keep using the `ExportExcelPlugin`, `grid.exportExcel`, and `export-excel` event names.

Use this page for the quick setup. Provider adapters, cell formatting, CSV import, and migration details are split into focused pages linked below.

## Quick Setup

Attach `ExportExcelPlugin` with your grid plugins:

```ts
import { ExportExcelPlugin } from '@revolist/revogrid-pro';

grid.plugins = [ExportExcelPlugin];
```

Trigger export through the event API:

```ts
grid.dispatchEvent(new CustomEvent('export-excel', {
  detail: {
    workbookName: 'orders.xlsx',
    sheetName: 'Orders',
  },
}));
```

Or call the plugin instance directly:

```ts
const plugins = await grid.getPlugins();
const excel = plugins.find((plugin) => plugin instanceof ExportExcelPlugin);

await excel?.export({
  workbookName: 'orders.xlsx',
  sheetName: 'Orders',
});
```

## Default Behavior

- The bundled provider is `write-excel-file` and exports `.xlsx` files only.
- Extensionless `workbookName` values receive `.xlsx`.
- `sheetName` is normalized for Excel worksheet rules.
- Export reads grid data stores, not rendered DOM rows, so virtualized offscreen rows are included.
- Row order is pinned top rows, body rows, then pinned bottom rows.
- Columns follow `providers.column.getColumns('all')`.
- Grid-derived widths and freeze panes are inferred by default from column sizes, `colPinStart` columns, and pinned-top rows.

## Focused Guides

- [Export Providers](./providers/) explains provider precedence, default `.xlsx` limits, `providerOptions`, `deriveGridOptions`, optional ExcelJS and SheetJS adapters, workbook-module adapters, and custom providers.
- [Cell Formatting](./cell-formatting/) explains `column.excelExport`, formula/date/numeral/select helpers, grouped headers, cell merge export support, and the provider context matrix.
- [CSV Import](./csv-import/) explains CSV-only drag/drop import, `allowDrag`, `allowedExtensions`, `skipColumnGeneration`, events, and plugin import helpers.
- [Migrating to v2.0](/guides/migration-v2/) explains the SheetJS removal, CSV-only default import, app-owned XLSX import, and provider migration paths as a breaking change from `2.0.8`.

## Related Export Guides

- [Excel Import and Export Libraries](/guides/excel-export/excel-import-export-libraries/) compares SheetJS, ExcelJS, read-excel-file, and write-excel-file for app-owned workbook workflows.
- [Gantt Grid, Export, Rendering](/guides/gantt/features/grid-export-rendering/) covers Gantt task-row export mapping and reporting recipes.
- [Pivot Export And State](/guides/pivot/concepts/export-state/) covers Pivot CSV, TSV, and state JSON helpers.
- [Export Excel API](/api/export-excel/) is the generated API reference for the complete public type surface.
