Section 4: Excel/Google Sheets, data analysis and reporting

Scenario 36: Creating an Excel report with formulas from a CSV

Level: Advanced · Tools: Claude, code execution and file creation, and Excel `.xlsx`

Who and in what situation

Burak, a production planning analyst at a factory in Kocaeli, receives shift records as CSV files. He prepares an editable Excel file with summaries by production line and downtime reason for management.

How it is done today

Burak manually sets up the summary tab, formulas, and chart formatting. When a new CSV arrives, he recreates the same structure.

How to do it with AI

  1. In Claude, he checks that Code execution and file creation is enabled under Settings > Capabilities. Team and Enterprise administrators can disable this at the organization level. [72]
  2. He clicks the + button at the bottom left of the chat box, then Add files or photos, and uploads the CSV. [81]
  3. He asks Claude to create an .xlsx containing raw data, a cleaning summary, a summary by production line, working formulas, and trend charts. Claude can perform Python analysis on uploaded data and create an Excel file. [72]
  4. He checks the formulas and totals in the downloaded file against the source CSV; if any fields are incorrect, he asks for only the relevant sheet to be corrected.

Example prompt

Create an editable Excel workbook {from the production CSV file I uploaded}. Keep the raw data on a separate tab. Add production totals by line and shift, a downtime reason summary, and a weekly trend chart. Explain the formulas and assumptions on the Notes tab; first list the data quality issues.

Evidence and real-world example

No published independent case study was found for this factory scenario. Anthropic’s official documentation states that Claude can load CSV files, perform Python analysis, create Excel .xlsx files, and generate charts. [72] The official upload page also states that code execution and file creation must be enabled to upload XLSX files. [81]

Points to consider

Do not share the generated file without checking its formulas against the source CSV. Anthropic notes that network access may increase the risk of prompt injection or data exfiltration; check network settings and organizational policy when working with sensitive data. [72]

Sources for this scenario

  1. Create and edit files with Claude (support.claude.com)
  2. Upload files to Claude (support.claude.com)