Most Excel automation tools lock you into brittle scripts that break every time Microsoft ships an update. The OpenClaw excel skill works differently.
Instead of writing VBA macros or maintaining Python scripts, you describe what you want in plain language. Your AI agent handles the Excel operations through Microsoft Graph API, the same API that powers Microsoft 365’s web interface. No COM objects, no desktop automation that breaks when you alt-tab. Just reliable spreadsheet operations through conversation.
This guide walks through everything: Graph API setup, basic operations, advanced features, and troubleshooting. By the end, you’ll have an AI agent that can read your sales data, generate quarterly reports, and create charts without opening Excel.
What Is the OpenClaw Excel Skill?
The excel skill is an OpenClaw skill that connects your AI agent to Microsoft Excel through the Microsoft Graph API. It gives your agent the ability to:
- Read and write spreadsheet data
- Generate Excel formulas from descriptions
- Create charts and pivot tables
- Run bulk operations across workbooks
- Analyze data and summarize insights
It’s built for the modern Excel stack: Microsoft 365, OneDrive, and SharePoint. If your company uses Office 365, this works with your existing infrastructure. No local Excel installation required.
The skill lives on Claw Directory alongside 400+ other curated skills for OpenClaw and Moltbot. It’s open-source, maintained by the community, and works the same way all OpenClaw skills work: install, configure, use.
Prerequisites: What You Need
Before you start, make sure you have:
1. OpenClaw Installed
If you haven’t set up OpenClaw yet, follow our Getting Started guide. The installation takes five minutes. You’ll need a Claude API key from Anthropic.
Verify OpenClaw is working:
openclaw --version
2. Microsoft 365 Subscription
The excel skill requires a Microsoft 365 account (Business, Enterprise, or Education). Personal Microsoft accounts may have limited API access. Check with your IT admin if you’re using a work account.
3. Azure AD App Registration
You’ll need to register an Azure AD application to get API credentials. This sounds complicated but takes about ten minutes. We’ll walk through it step by step.
4. A Spreadsheet to Test With
Have a test Excel workbook in OneDrive or SharePoint. Something with a few rows of data so you can verify operations work correctly.
That’s it. No Excel desktop application required. Everything runs through the cloud API.
Step 1: Install the Excel Skill
Install the skill from ClawHub:
clawhub install excel
This downloads the excel skill to ~/.openclaw/skills/excel/ and makes it available to your agent. Verify it loaded:
openclaw skills list | grep excel
You should see excel in the output.
Don’t reload your agent yet. The skill won’t work until you configure Microsoft Graph API credentials in the next step.
Step 2: Register an Azure AD Application
The excel skill authenticates with Microsoft using OAuth 2.0 through Azure Active Directory. You’ll create an app registration that gives your agent permission to access Excel files.
Create the App Registration
- Go to Azure Portal
- Navigate to Azure Active Directory → App registrations
- Click “New registration”
- Fill in the form:
- Name:
OpenClaw Excel Skill(or any name you prefer) - Supported account types: “Accounts in this organizational directory only”
- Redirect URI: Leave blank for now
- Name:
- Click “Register”
You’ll land on the app’s overview page. Copy the “Application (client) ID” — you’ll need it in a moment.
Add API Permissions
- In your app registration, go to “API permissions”
- Click “Add a permission”
- Select “Microsoft Graph”
- Choose “Delegated permissions”
- Add these permissions:
Files.ReadWrite.All(read and write Excel files)Sites.ReadWrite.All(access SharePoint sites)User.Read(basic profile information)
- Click “Add permissions”
- Click “Grant admin consent” (if you have admin access)
If you don’t have admin access, ask your IT admin to grant consent for these permissions.
Create a Client Secret
- Go to “Certificates & secrets”
- Click “New client secret”
- Description:
OpenClaw Excel Access - Expiration: Choose 12 or 24 months
- Click “Add”
- Copy the secret value immediately — you can’t view it again
Configure Redirect URI
- Go to “Authentication”
- Click “Add a platform”
- Select “Web”
- Redirect URI:
http://localhost:8080/callback - Check “Access tokens” and “ID tokens”
- Click “Configure”
Save all changes. Your Azure AD app is ready.
Step 3: Configure OpenClaw with Your Credentials
Set your Microsoft Graph credentials as environment variables:
openclaw config set skill.excel.client-id YOUR_CLIENT_ID
openclaw config set skill.excel.client-secret YOUR_CLIENT_SECRET
openclaw config set skill.excel.tenant-id YOUR_TENANT_ID
Replace the placeholders:
YOUR_CLIENT_ID— Application (client) ID from AzureYOUR_CLIENT_SECRET— Client secret you generatedYOUR_TENANT_ID— Directory (tenant) ID from Azure (found on the app overview page)
Alternatively, set them as environment variables:
export MSGRAPH_CLIENT_ID=your_client_id
export MSGRAPH_CLIENT_SECRET=your_client_secret
export MSGRAPH_TENANT_ID=your_tenant_id
Add these to your ~/.bashrc or ~/.zshrc to persist across sessions.
Step 4: Authenticate and Test
Start your OpenClaw agent:
openclaw start
Open your messaging app (Telegram, Discord, etc.) and send a test message:
List my Excel files in OneDrive
The first time you use the excel skill, your agent will respond with an authentication URL. Open it in your browser, sign in to your Microsoft account, and grant permissions. The token is saved locally and refreshed automatically.
After authentication, your agent should list your Excel files. If you see a list, authentication worked.
Basic Excel Operations
Now that the skill is configured, let’s walk through common operations.
Reading Data from a Spreadsheet
Point your agent at a specific workbook and range:
Read cells A1 to C10 from Sales-Q1.xlsx
Your agent fetches the data and displays it in a readable format. Use this to pull data into conversation before analysis.
Writing Data to Cells
In Budget-2026.xlsx, write "Q1 Revenue" to cell A1 and 125000 to B1
The agent updates the specified cells. Changes save immediately to OneDrive or SharePoint.
Finding a Specific Value
Find all rows in Sales-Q1.xlsx where column B contains "Closed"
The agent searches the spreadsheet and returns matching rows. Useful for filtering data without writing formulas.
Getting Worksheet Information
Show me all worksheets in Inventory.xlsx
The agent lists every sheet in the workbook along with basic metadata like row count and column headers.
Generating Excel Formulas with AI
One of the best features: describe what you want to calculate and the agent writes the Excel formula.
Example: Sum with Conditions
In Sales.xlsx, write a formula in cell D2 that sums column C where column A equals "North"
The agent generates:
=SUMIF(A:A,"North",C:C)
And writes it to cell D2. You get the result without remembering SUMIF syntax.
Example: Lookup Across Sheets
In cell E5, look up the value from A5 in the Products sheet and return the price from column C
The agent produces a VLOOKUP or XLOOKUP formula (depending on your Excel version) and inserts it.
Example: Date Calculations
Calculate the number of business days between the date in B2 and today's date, write it to C2
The agent uses NETWORKDAYS and handles the formula structure.
This is powerful for non-Excel-experts. Describe the logic you need. The agent translates it to Excel’s formula language.
Creating Charts and Visualizations
The excel skill can generate charts from your data.
Basic Chart Creation
Create a column chart from Sales.xlsx showing monthly revenue in column B
The agent:
- Reads the data range
- Creates a chart object
- Configures the chart type and data series
- Inserts it into the workbook
The chart appears in Excel when you open the file.
Customizing Charts
In Q1-Report.xlsx, create a line chart for columns A and B, title it "Sales Trend", use red lines
The agent applies your formatting preferences. You can specify colors, titles, axis labels, and chart types.
Multiple Data Series
Create a chart comparing column C (Revenue) and column D (Costs) by month from column A
The agent builds a multi-series chart with proper legends and labels.
Charts created through the skill are native Excel chart objects. Edit them in the Excel desktop app or web interface if you need fine-tuning.
Building Pivot Tables from Conversation
Pivot tables are where the skill saves the most time. Describing a pivot table structure is easier than clicking through Excel’s pivot table wizard.
Simple Pivot Table
In Sales-Data.xlsx, create a pivot table that shows total revenue by region
The agent:
- Identifies your data range
- Creates a pivot table on a new sheet
- Configures rows (Region) and values (Sum of Revenue)
- Names it appropriately
Multi-Dimensional Pivot
Create a pivot table showing revenue and units sold, grouped by product and quarter
The agent builds a two-dimensional pivot with multiple value fields. This would take several minutes manually. The agent does it in seconds.
Filtering Pivots
Create a pivot table of sales by region, but exclude the "Test" region
The agent applies filters to the source data or the pivot itself.
Pivot tables are complex Excel features. The skill makes them accessible to anyone who can describe what they want to see.
Bulk Operations Across Multiple Files
The excel skill can operate on multiple workbooks in one request.
Consolidating Data
Combine sheet1 from Sales-Jan.xlsx, Sales-Feb.xlsx, and Sales-Mar.xlsx into Q1-Report.xlsx
The agent reads data from three files and writes it into a consolidated workbook.
Applying Formulas Across Files
In every workbook in my Sales folder, add a column that calculates total from price times quantity
The agent iterates through matching files and applies the formula to each one.
Batch Reporting
For each workbook in Reports/, create a summary showing total revenue, average deal size, and top customer
The agent processes each file and compiles a summary report. Useful for monthly reporting workflows.
Bulk operations are where AI-driven automation shines. Describe the pattern once. Apply it to dozens of files.
Data Analysis and Insights
The excel skill isn’t just about operations. Your agent can analyze the data and surface insights.
Summarizing Data
Analyze Sales-Q4.xlsx and tell me the top 3 products by revenue
The agent reads the data, calculates totals, sorts, and returns the answer in plain language.
Identifying Trends
Look at monthly revenue in column B and tell me if sales are increasing or decreasing
The agent computes month-over-month changes and describes the trend.
Spotting Anomalies
Check Expenses.xlsx for any entries over $10,000 and list them
The agent filters and highlights outliers.
This turns Excel from a static tool into a conversational data analysis interface. Ask questions about your data. Get answers in seconds.
Alternative: OpenClaw Google Sheets Skill
Microsoft Excel isn’t the only spreadsheet platform OpenClaw supports. If your team uses Google Workspace instead of Microsoft 365, install the google-sheets skill:
clawhub install google-sheets
The google-sheets skill provides similar functionality:
- Read and write cells
- Generate formulas
- Create charts
- Build pivot tables
- Bulk operations
The API setup is different (Google Cloud Console instead of Azure), but the usage is nearly identical. Check Claw Directory for the full google-sheets skill documentation.
Most teams use one or the other. Install the skill that matches your company’s infrastructure.
Troubleshooting Common Issues
”Authentication failed” Error
Check that:
- Your Azure AD app has the correct permissions (Files.ReadWrite.All, Sites.ReadWrite.All)
- Admin consent was granted
- Your client secret hasn’t expired
- The redirect URI is exactly
http://localhost:8080/callback
Re-run the authentication flow:
openclaw config unset skill.excel.token
openclaw start
Then trigger the excel skill again to get a fresh auth URL.
”Workbook not found” Error
The excel skill searches your OneDrive and SharePoint sites. If it can’t find a workbook:
- Verify the file is in OneDrive or SharePoint (not your local drive)
- Check the filename spelling — it’s case-sensitive
- Make sure you have access permissions to the file
- Try using the full OneDrive path:
/Documents/Sales-Q1.xlsx
”Permission denied” Error
This usually means:
- The Azure AD app permissions weren’t granted
- Your Microsoft 365 admin blocked third-party app access
- The file is in a restricted SharePoint site
Check with your IT admin if you’re using a work account. They may need to approve the app or adjust tenant settings.
”Rate limit exceeded” Error
Microsoft Graph API has rate limits (typically 2,000 requests per app per tenant per 10 seconds). If you’re doing bulk operations on hundreds of files, you might hit this.
The skill includes retry logic with exponential backoff, so most rate limit errors resolve automatically. If it persists, slow down your requests.
Formula Syntax Errors
If the agent generates a formula that doesn’t work in Excel:
- Describe the formula more specifically (“use SUMIF” instead of “sum where”)
- Check that your Excel version supports the function
- Verify column references are correct
The agent understands standard Excel functions. Exotic add-in functions might not work.
Security Considerations
You’re giving an AI agent access to your spreadsheets. Take security seriously.
API Key Management
Never hardcode your Microsoft Graph credentials in the SKILL.md or share them in messages. Store them in OpenClaw’s config system or environment variables.
Rotate your client secret regularly (at least annually). Azure lets you create multiple secrets, so you can add a new one before the old one expires.
File Access Scope
The excel skill requests Files.ReadWrite.All, which grants access to all files in OneDrive and SharePoint. If you want to limit scope:
- Create a dedicated SharePoint site for OpenClaw-accessible files
- Use more restrictive Graph API permissions (like
Files.ReadWritescoped to specific folders) - Monitor the Azure AD app’s sign-in logs for unusual activity
Audit Trail
Microsoft Graph logs all API calls. Check your Azure AD audit logs periodically to see what the skill accessed. If you see unexpected file access, revoke the token and investigate.
Review the Skill Code
The excel skill is open-source. Read the SKILL.md at ~/.openclaw/skills/excel/SKILL.md to see exactly what it can do. If you find anything suspicious, report it to the skill maintainer or Claw Directory’s security team.
For deeper security guidance, read our ClawHub Skills Security guide.
Use Cases: What People Build with This
Real workflows people automate with the OpenClaw excel skill:
Monthly Financial Reports
Read revenue data from Sales-Feb.xlsx, calculate totals by category, create a summary table in Report-Feb.xlsx
Finance teams use this to consolidate monthly numbers without manual copying.
Sales Pipeline Analysis
In Pipeline.xlsx, show me all deals over $50k that close this quarter, sorted by value
Sales managers query their pipeline data conversationally instead of filtering in Excel.
Inventory Audits
For each product in Inventory.xlsx, check if quantity is below 10 and flag it
Warehouse teams get low-stock alerts without setting up complex conditional formatting.
Automated Dashboards
Create a dashboard sheet with total revenue, average order value, and a chart of monthly trends from Sales-2026.xlsx
Operations teams generate dashboards on demand instead of maintaining manual templates.
Data Migration
Copy all rows from Legacy-System.xlsx where status is "Active" into New-System.xlsx
IT teams move data between systems without writing migration scripts.
The pattern is always the same: describe what you want, the agent handles the Excel operations.
Advanced: Custom Excel Workflows
Once you’re comfortable with basic operations, build custom workflows that combine multiple steps.
Multi-Step Reporting
1. Read sales data from January, February, and March workbooks
2. Consolidate into Q1-Report.xlsx
3. Calculate quarter-over-quarter growth
4. Create a chart showing the trend
5. Save the report to SharePoint
Break complex processes into clear steps. The agent executes them in sequence.
Conditional Operations
If total revenue in Sales.xlsx is over $100k, create a bonus calculation sheet. Otherwise, skip it.
The agent evaluates conditions and branches accordingly.
Scheduled Operations
Combine the excel skill with scheduling tools to automate recurring tasks:
# In your crontab
0 9 * * 1 openclaw chat "Generate weekly sales report from Sales.xlsx and email it"
This runs every Monday at 9 AM. Pair the excel skill with email or messaging skills for full automation.
Comparing Excel Skill vs. Traditional Automation
| Approach | Excel Skill | VBA Macro | Python Script |
|---|---|---|---|
| Setup Time | 15 minutes | 2-4 hours | 1-3 hours |
| Maintenance | Low (API is stable) | High (breaks on Excel updates) | Medium (library updates) |
| Accessibility | Conversational | Requires VBA knowledge | Requires Python knowledge |
| Runs Remotely | Yes (cloud API) | No (desktop only) | Requires server setup |
| Multi-File Operations | Native support | Manual iteration | Manual iteration |
The excel skill trades some control for simplicity. If you need pixel-perfect chart formatting or advanced VBA features, traditional automation is better. For most tasks — reading data, generating reports, creating summaries — the excel skill is faster and easier to maintain.
Related Skills and Ecosystem
The excel skill works well with other OpenClaw skills:
- google-sheets — Google Sheets equivalent
- gamma — Generate presentations from Excel data
- tube-summary — Summarize YouTube training videos before implementing formulas
- diagram-gen — Visualize data relationships from spreadsheets
Browse the full skill library at Claw Directory. The 400+ curated skills cover media, productivity, development, and more.
For general OpenClaw setup, see our Getting Started guide. For building your own skills, read How to Build OpenClaw Skills.
FAQ
Does the excel skill work with Excel desktop?
The skill uses Microsoft Graph API, which operates on files in OneDrive and SharePoint. It works with Excel Online and any desktop version that syncs to OneDrive. If your Excel files are only on your local machine, upload them to OneDrive first.
Can I use this with personal Microsoft accounts?
Limited support. Personal Microsoft accounts have restricted Graph API access. Microsoft 365 Business, Enterprise, or Education accounts are recommended.
How much does this cost?
The excel skill is free. You pay for:
- Claude API usage (Anthropic charges per token, typically a few dollars/month for personal use)
- Microsoft 365 subscription (if you don’t already have one)
No additional fees for the skill or Graph API access.
Does this work offline?
No. The skill requires internet access to call Microsoft Graph API. If you need offline Excel automation, use VBA or Python with local file access.
What’s the file size limit?
Microsoft Graph API handles workbooks up to 100 MB. Larger files may time out or fail. For huge datasets, consider breaking them into smaller files or using a different approach.
Can I automate Excel on macOS?
Yes. The excel skill works on macOS, Linux, and Windows (via WSL). As long as OpenClaw runs on your platform and you have internet access, the skill works.
How do I uninstall the excel skill?
clawhub uninstall excel
This removes the skill. Your Azure AD app registration stays in Azure until you manually delete it.
Where can I get help with the skill?
- Check the skill’s README at
~/.openclaw/skills/excel/SKILL.md - Search Claw Directory for examples
- Ask your agent: “How do I use the excel skill to create a chart?”
- Join the OpenClaw community (GitHub, Discord, forums)
Summary
| Step | Action | Estimated Time |
|---|---|---|
| 1 | Install excel skill | 1 minute |
| 2 | Register Azure AD app | 10 minutes |
| 3 | Configure credentials | 2 minutes |
| 4 | Authenticate and test | 2 minutes |
| 5 | Use for real workflows | Ongoing |
The OpenClaw excel skill turns Microsoft Excel into a conversational interface. Read data, write formulas, generate charts, build pivots — all through plain language messages to your AI agent.
It’s built for the modern Excel stack: Microsoft 365, OneDrive, SharePoint. If your company already uses Office 365, the infrastructure is ready. Add OpenClaw, configure Graph API credentials, and start automating.
For teams that run on Google Workspace instead, the google-sheets skill offers equivalent functionality. Check Claw Directory for the full list of productivity skills.
Start with a simple operation: read a few cells from a test spreadsheet. Once that works, build from there. Most users go from basic reads to complex multi-file reporting workflows within a week. The skill handles the Excel API complexity. You focus on what you want to accomplish.
Install OpenClaw, set up the excel skill, and turn your spreadsheets into a conversational data tool.