Excel Spreadsheet Tool
This skill enables working with Microsoft Excel spreadsheets using Node.js tools.
Capabilities
- Read data from existing Excel files and extract tabular data
- Create new workbooks with multiple worksheets
- Write data to cells and ranges
- Apply formulas and calculations (SUM, AVERAGE, etc.)
- Format cells with colors, borders, fonts, and auto-sizing
- Analyze data with column statistics (sum, average, min, max)
- Update specific cells in existing spreadsheets
When to Use
Invoke this skill when the user:
- Mentions Excel files, spreadsheets, .xlsx files, or tabular data
- Asks to create, read, or modify spreadsheet data
- Needs to perform calculations, formulas, or data analysis
- Wants to format data in rows and columns
- Asks about data visualization or charts
How to Use
The Excel tool is implemented at src/tools/excel-tool.ts. Invoke using the Bash tool:
Reading a Spreadsheet
ts-node src/tools/excel-tool.ts read "/path/to/file.xlsx" "SheetName"
Creating a Spreadsheet
ts-node src/tools/excel-tool.ts create "/path/to/new.xlsx" '[{"name":"Sheet1","data":[["A1","B1"],["A2","B2"]],"headers":["Column1","Column2"]}]'
Getting Column Statistics
ts-node src/tools/excel-tool.ts stats "/path/to/file.xlsx" "Sheet1" "A"
JSON Structure for Creating Spreadsheets
[
{
"name": "Sheet1",
"headers": ["Name", "Value", "Total"],
"data": [
["Item 1", 100, 200],
["Item 2", 150, 300]
],
"formulas": [
{"cell": "C3", "formula": "SUM(B2:B3)"}
]
}
]
Implementation
Uses the exceljs npm library for comprehensive Excel file manipulation.
1---2name: excel-23description: Create, read, edit, and analyze Microsoft Excel spreadsheets (.xlsx files). Use for spreadsheet data, calculations, formulas, charts, and tabular data analysis.4---5
6# Excel Spreadsheet Tool
7
8This skill enables working with Microsoft Excel spreadsheets using Node.js tools.
9
10## Capabilities
11
12- **Read** data from existing Excel files and extract tabular data
13- **Create** new workbooks with multiple worksheets
14- **Write** data to cells and ranges
15- **Apply** formulas and calculations (SUM, AVERAGE, etc.)
16- **Format** cells with colors, borders, fonts, and auto-sizing
17- **Analyze** data with column statistics (sum, average, min, max)
18- **Update** specific cells in existing spreadsheets
19
20## When to Use
21
22Invoke this skill when the user:
23- Mentions Excel files, spreadsheets, .xlsx files, or tabular data
24- Asks to create, read, or modify spreadsheet data
25- Needs to perform calculations, formulas, or data analysis
26- Wants to format data in rows and columns
27- Asks about data visualization or charts
28
29## How to Use
30
31The Excel tool is implemented at `src/tools/excel-tool.ts`. Invoke using the Bash tool:
32
33### Reading a Spreadsheet
34```bash
35ts-node src/tools/excel-tool.ts read "/path/to/file.xlsx" "SheetName"
36```
37
38### Creating a Spreadsheet
39```bash
40ts-node src/tools/excel-tool.ts create "/path/to/new.xlsx" '[{"name":"Sheet1","data":[["A1","B1"],["A2","B2"]],"headers":["Column1","Column2"]}]'
41```
42
43### Getting Column Statistics
44```bash
45ts-node src/tools/excel-tool.ts stats "/path/to/file.xlsx" "Sheet1" "A"
46```
47
48## JSON Structure for Creating Spreadsheets
49
50```json
51[
52 {
53 "name": "Sheet1",
54 "headers": ["Name", "Value", "Total"],
55 "data": [
56 ["Item 1", 100, 200],
57 ["Item 2", 150, 300]
58 ],
59 "formulas": [
60 {"cell": "C3", "formula": "SUM(B2:B3)"}
61 ]
62 }
63]
64```
65
66## Implementation
67
68Uses the `exceljs` npm library for comprehensive Excel file manipulation.