write_file
Write data to CSV or Excel files with support for multiple sheets, enabling structured data export from the Excel MCP Server.
Instructions
Write data to a new CSV or Excel file (supports multiple sheets for Excel)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filePath": "<filePath>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path for the new file (must end with .csv, .xlsx, or .xls) | |
| data | No | Array of arrays representing rows of data (single sheet mode) | |
| headers | No | Optional headers for the first row (single sheet mode) | |
| sheet | No | Sheet name for Excel files (single sheet mode, defaults to "Sheet1") | |
| sheets | No | Array of sheet objects for multi-sheet Excel files |