Home

Use Claude Code with Excel in VS Code

You want a spreadsheet built - formulas, formatting, maybe a chart - but you don’t want to fight with Excel’s menus. Think of Claude Code as an assistant who knows Excel inside and out: you describe what you want in plain English, and it builds a real .xlsx file with working formulas. This tutorial shows you how to set up a project folder in VS Code and have Claude Code create and edit Excel spreadsheets for you.

Key Concepts

What You’ll Need

Step 1: Install the Spreadsheet Viewer Extension in VS Code

Note: This extension used to be called Excel Viewer by GrapeCity, and older guides and videos may still use that name. Searching for “Excel Viewer” now shows several other extensions, so search by the ID above to get the right one. The ID still starts with GrapeCity - that’s expected.

This lets you click any .xlsx file and see it rendered as a spreadsheet right inside VS Code, with no need to switch to another app.

Step 2: Create Your Project Folder

Step 3: Start Claude Code

claude

Step 4: Create Your First Spreadsheet

Create a spreadsheet called budget.xlsx with columns for Category, Monthly Amount, and Notes. Add 6 example expense categories like Rent, Groceries, and Utilities with realistic amounts. Add a Total row at the bottom that sums the Monthly Amount column using a formula.

Step 5: Preview the Result

Step 6: Ask Claude to Add a Chart

Add a pie chart to budget.xlsx showing each category's share of the total monthly spending.

Step 7: Edit the Data and Ask Claude to Update It

I changed some numbers in budget.xlsx. Recalculate the totals and make sure the chart still matches the data.

This is the core workflow: describe what you want, let Claude build it, check the result, and ask for changes in plain English.

Step 8: Ask Claude to Clean Up Messy Data

Claude Code is also useful for fixing spreadsheets that are already a mess.

Create a messy_sales.csv file with 15 rows of sales data that has some issues: a few blank cells, inconsistent date formats, and one duplicate row. Then create a cleaned version called sales_clean.xlsx that fixes these problems and explain what you fixed.

Next Steps

Troubleshooting

Workflow Summary


Created by Steven Ge on September 21, 2026.