generate_spreadsheet
Create spreadsheets or pivot tables from tabular data for display and analysis. Provide rows/values to generate pivot tables; otherwise create regular tables for comparing and summarizing data.
Instructions
Generate a spreadsheet or pivot table for displaying tabular data. When 'rows' or 'values' fields are provided, it renders as a pivot table (cross-tabulation); otherwise, it renders as a regular table. Useful for displaying structured data, comparing values across categories, and creating data summaries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Data for spreadsheet, an array of objects where each object represents a row. Keys are column names and values can be string, number, or null. Such as, [{ name: 'John', age: 30 }, { name: 'Jane', age: 25 }]. | |
| rows | No | Row header fields for pivot table. When 'rows' or 'values' is provided, the spreadsheet will be rendered as a pivot table. | |
| theme | No | Set the theme for the spreadsheet, optional, default is 'default'. | default |
| width | No | Set the width of chart, default is 600. | |
| height | No | Set the height of chart, default is 400. | |
| values | No | Value fields for pivot table. When 'rows' or 'values' is provided, the spreadsheet will be rendered as a pivot table. | |
| columns | No | Column header fields, used to specify the order of columns. For regular tables, this determines column order; for pivot tables, this is used for column grouping. |