tessl install tessl/pypi-comtypes@1.4.0Pure Python COM package for Windows COM automation and interoperability
Agent Success
Agent success rate when using this tile
88%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.99x
Baseline
Agent success rate without this tile
89%
Build a utility that automates Excel to generate a formatted sales report. The utility should create a workbook, populate it with sales data, apply formatting, and calculate totals.
Create a new Excel workbook with a worksheet named "Sales Report". The worksheet should contain:
For each data row, calculate the Total column (Quantity × Price) and set it in the appropriate cell.
After all data rows, add a row with:
Apply the following formatting:
Save the workbook to a file named "sales_report.xlsx" in the current directory.
@generates
def generate_sales_report(output_path: str) -> None:
"""
Generate an Excel sales report with formatted data and calculations.
Args:
output_path: Path where the Excel file should be saved
Raises:
Exception: If COM automation fails or file cannot be saved
"""
passProvides COM automation support for interacting with Excel application.
@satisfied-by