budget_variance_analysis
Analyze budget vs actual figures in Excel, calculating variances per category to highlight overspending or underspending.
Instructions
Compare budget vs actual values in a sheet and return variances per category.
Args: file_path: Workbook path. sheet_name: Worksheet name. category_column, budget_column, actual_column: Column identifiers for the analysis. header_row: 1-based header row index. output_file: Optional path to write results.
Returns: dict: Per-category variance and status.
Notes:
- Mutates workbook only if output_file provided.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| header_row | No | ||
| sheet_name | No | Sheet1 | |
| output_file | No | ||
| actual_column | No | C | |
| budget_column | No | B | |
| category_column | No | A |