excel_add_sheet
Add a new sheet to an Excel workbook. Insert the sheet at the start, end, or after a specific existing sheet, with optional output path.
Instructions
Add a new sheet to an Excel workbook.
Creates a new empty sheet in the workbook at the specified position. The sheet can be inserted at the start, end, or after a specific existing sheet.
Example: excel_add_sheet(file_path="data.xlsx", sheet_name="Summary") excel_add_sheet(file_path="data.xlsx", sheet_name="NewSheet", position="start") excel_add_sheet(file_path="data.xlsx", sheet_name="Details", position="Sheet1")
Args: file_path: Path to the .xlsx or .xlsm file sheet_name: Name for the new sheet position: Where to insert - 'start', 'end' (default), or name of sheet to insert after output_path: Optional output path (defaults to overwriting input file)
Returns: Dictionary with success status and sheet details
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the .xlsx or .xlsm file | |
| sheet_name | Yes | Name for the new sheet | |
| position | No | Where to insert - 'start', 'end' (default), or name of sheet to insert after | |
| output_path | No | Optional output path (defaults to overwriting input file) |