Skip to content

GravionLabs/elysion / .agents/skills/ng-ag-grid-developer

ng-ag-grid-developer

Verified

Build or modify Angular components with AG Grid Enterprise. Use when a task mentions ag-grid.

references/excel-export.md

View on GitHub
# AG Grid — Excel Export (Enterprise)

Module: `ExcelExportModule`. `api.exportDataAsExcel()` mirrors current grid state (sort, filter, grouping, visible columns).

```typescript
api.exportDataAsExcel({
  fileName: 'my-report.xlsx',
  sheetName: 'Data',
  columnKeys: ['name', 'price'], // only these columns
  onlySelected: false,
  shouldRowBeSkipped: (p) => p.node.data?.status === 'archived',
  columnWidth: (p) => (p.column?.getId() === 'name' ? 200 : 100),
  prependContent: [[{ data: { value: 'Report Title', type: 'String' }, mergeAcross: 3 }]],
  appendContent: [[{ data: { value: 'End of Report', type: 'String' } }]],
});
```

## Styles

Define `gridOptions.excelStyles: ExcelStyle[]` (`{ id: 'highlight', interior: { color: '#FFFF00', pattern: 'Solid' }, font: { bold: true } }`) and reference the `id` from `ColDef.cellClass` — styles are not exported otherwise.

## Multiple sheets

```typescript
const s1 = api.getSheetDataForExcel({ sheetName: 'Summary' });
const s2 = otherApi.getSheetDataForExcel({ sheetName: 'Detail' });
if (s1 && s2) {
  const data = getMultipleSheetsAsExcel({ data: [s1, s2] }); /* Blob + <a download> */
}
```

## Gotchas

- Cell renderer output is **not** exported — raw values or `valueFormatter` output are; use `valueFormatter` for formatted export values
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall