Create an Excel workbook (.xlsx)
ai_create_xlsxBuilds real Excel .xlsx workbooks from data with multiple sheets, formatted headers, column widths, number formats, live formulas, filters, frozen headers, and totals rows.
Instructions
Build a real Excel .xlsx file from data: one or more sheets, each with optional column definitions (header, key, width, numFmt) and rows given as objects or arrays. Bold shaded header, frozen header row and filter buttons (both on by default), column widths fitted to the content, Excel number formats (raw codes like "#,##0.00" or aliases: integer, number, percent, currency, usd, eur, gbp, date, datetime, time, text), strings starting with "=" written as live formulas (=SUM(B2:B9), =B2*C2, cross-sheet refs), ISO date strings written as real dates, and an optional totals row (SUM/AVERAGE/COUNT/MIN/MAX formulas). Up to 50 sheets and 1,000,000 rows per sheet. Formulas are calculated by Excel when the file is opened. Writes to "output" (default "workbook.xlsx" in the output folder) and returns the path and a summary of each sheet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Workbook title (file properties, and the default file name). | |
| author | No | Author in the file properties. | |
| output | No | Where to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set). | |
| sheets | Yes | ||
| parseDates | No | Write ISO date strings as Excel dates (default true). | |
| returnBase64 | No | Also return the output as base64 in the result (only for small files). Default false. |