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

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
AI_GATEWAY_API_KEYGet key →
External Services
openaiupstash
Ready to use?
View the full interactive pattern with live preview and copy the source code.
View Pattern on DesktopRelated Patterns


Agent Sheet Artifact
Template-style sheet artifact with data-sheetDelta streaming, CSV grid editor, in-memory versions, and quick prompts — no database persistence.
aispreadsheet+5
View →


Agent DOCX Artifact
Download-first Word artifact pattern. The agent streams Markdown through a tool call, renders a document preview, and exports a real .docx file.
aiword+6
View →
End of Pattern



