---
name: "exceljs-spreadsheet-export-stream"
description: "Read, write, style, and stream massive multi-sheet Excel (.xlsx) workbooks with formulas."
metadata:
  author: "Guyon Roche"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "export excel file exceljs"
  - "stream large xlsx exceljs"
  - "style excel cells exceljs"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# ExcelJS High-Performance Spreadsheet Read/Write & Streaming

Builds spreadsheets with ExcelJS: creating workbooks, styling cells (fonts, fills, borders), adding Excel formulas, data validation rules, generating charts, and using WorkbookWriter streaming to export million-row sheets.

## When to Invoke
Invoke this skill whenever you need to:
- export excel file exceljs
- stream large xlsx exceljs
- style excel cells exceljs

## Execution SOP & Rules
1. Initialize workbook: const workbook = new ExcelJS.Workbook(); const worksheet = workbook.addWorksheet('Sales').
2. Define columns: worksheet.columns = [{ header: 'ID', key: 'id', width: 10 }, { header: 'Total', key: 'total' }].
3. Style header row: worksheet.getRow(1).font = { bold: true, color: { argb: 'FFFFFF' } }; worksheet.getRow(1).fill = { ... }.
4. For large exports: use const workbook = new ExcelJS.stream.xlsx.WorkbookWriter({ stream: responseStream }).

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
