Formats
Pattern
INT·Jun 26

Agent XLSX Artifact

Download-first Excel artifact pattern. The agent streams CSV through a tool call, renders a spreadsheet preview, and exports a real .xlsx file with SheetJS.

View Full Pattern on Desktop
Agent XLSX Artifact preview

Problems Solved

  • Generate downloadable Excel workbooks from agent output
  • Preview structured tabular output before download
  • Keep binary export client-side from a streamed source format

Use Cases

  • Excel report generation
  • Budget and forecast spreadsheets
  • Pipeline trackers and data exports

AI SDK APIs

streamTextcreateUIMessageStreamgatewaytooluseChat

Tags

aiexcelxlsxspreadsheetoffice-docsstreamingai-sdkartifacts

Requirements

Node.js
24+
Memory
256MB
Other
  • Vercel AI Gateway API key

Environment Variables

External Services

openaiupstash

Ready to use?

View the full interactive pattern with live preview and copy the source code.

View Pattern on Desktop
End of Pattern