name: excel-workflow description: | Complete Excel workflow with local file processing, Google Drive sync, and formula preservation. Process Excel files (.xlsx), track changes in SQLite, sync with Google Drive, and preserve formulas during updates. Use this skill when users want to upload Excel files, query data, update cells while preserving formulas, or sync with Google Drive. compatibility: Requires Python 3.8+, openpyxl, rclone, and Google Drive OAuth setup metadata: author: alexey version: "1.0.0" openclaw: emoji: 🔄 requires: bins: - rclone - python3 env: - OPENCLAW_EXCEL_PATH
Complete workflow for Excel file management with local processing, Google Drive backup, formula preservation, and SQLite tracking.
Simply drop an .xlsx file into the chat. The workflow automatically:
1. Analyzes file structure (sheets, formulas)
2. Uploads to Google Drive (gdrive:Excel/)
3. Saves metadata to SQLite tracker
# Manual processing
~/.openclaw/tools/openclaw-excel/excel-workflow process /path/to/file.xlsx
# Ask questions about your data
~/.openclaw/tools/openclaw-excel/excel-workflow query "what is total revenue?" --file sales.xlsx
# Update values - formulas stay intact
~/.openclaw/tools/openclaw-excel/excel-workflow update '{"C2": 100}' --file sales.xlsx
# Update formulas
~/.openclaw/tools/openclaw-excel/excel-workflow update '{"D2": "=B2*C2*1.5"}' --file sales.xlsx
# Install rclone (macOS)
brew install rclone
# Python packages (installed in venv automatically)
pip install openpyxl
# Configure rclone with Google Drive
rclone config
Follow prompts:
- Name: gdrive
- Storage: drive (Google Drive)
- Scope: 1 (Full access)
- Auto config: y (opens browser for OAuth)
Verify:
rclone lsd gdrive:
rclone mkdir gdrive:Excel/
The skill consists of 3 components:
~/.openclaw/tools/openclaw-excel/excel)Commands: info, read, update, show-formulas, get-cell
Tracker CLI (~/.openclaw/tools/openclaw-excel/excel-tracker)
~/.openclaw/excel_tracker.dbCommands: add, get-latest, search, list, stats
Workflow Orchestrator (~/.openclaw/tools/openclaw-excel/excel-workflow)
process, query, update, list, statsSee Installation Guide for detailed setup.
Analyze file, upload to Drive, and save to tracker:
excel-workflow process /path/to/file.xlsx [--telegram-id ID]
Output:
{
"status": "success",
"filename": "sales.xlsx",
"file_id": 1,
"drive_url": "gdrive:Excel/sales.xlsx",
"analysis": {
"sheets": 2,
"formulas": 15,
"sheet_names": ["Sales", "Summary"]
},
"message": "✅ File processed successfully!"
}
Read data and answer questions:
excel-workflow query "show me the data" [--file filename.xlsx]
Output:
{
"filename": "sales.xlsx",
"file_id": 1,
"sheets": ["Sales", "Summary"],
"data": [
[
{"address": "A1", "value": "Product", "type": "str"},
{"address": "B1", "value": "Price", "type": "int"}
]
],
"formulas": [
{"cell": "D2", "formula": "=B2*C2"}
],
"question": "show me the data",
"context": {
"sheet_count": 2,
"formula_count": 15,
"uploaded_at": "2026-02-20 10:30:00"
}
}
Update cells (values or formulas):
# Update values
excel-workflow update '{"C2": 100, "C3": 200}' [--file filename.xlsx]
# Update formulas
excel-workflow update '{"D2": "=B2*C2*1.5"}' --file sales.xlsx
# Mass update - create formulas for entire column
excel-workflow update '{"D2": "=B2*0.5", "D3": "=B3*0.5", ...}' --file data.xlsx
Output:
{
"status": "success",
"filename": "sales.xlsx",
"updated": 2,
"changes": [
{"cell": "C2", "old_value": 50, "new_value": 100},
{"cell": "C3", "old_value": 75, "new_value": 200}
],
"message": "✅ Updated and re-uploaded to Google Drive"
}
Show tracked files:
excel-workflow list [--limit 10]
Output:
[
{
"id": 2,
"original_filename": "sales_2026.xlsx",
"sheet_count": 2,
"formula_count": 15,
"uploaded_at": "2026-02-20 14:20:00"
},
{
"id": 1,
"original_filename": "budget.xlsx",
"sheet_count": 3,
"formula_count": 42,
"uploaded_at": "2026-02-19 09:15:30"
}
]
Show statistics:
excel-workflow stats
Output:
{
"total_files": 5,
"files_on_drive": 5,
"total_sheets": 12,
"total_formulas": 87
}
User action: Uploads sales.xlsx via Telegram
Agent workflow:
1. File saved to temporary location by Telegram handler
2. Detect .xlsx extension
3. Run: excel-workflow process /path/to/sales.xlsx --telegram-id <id>
4. Parse JSON result and respond:
Agent: "✅ I've received and processed sales.xlsx!
📊 Analysis:
- 2 sheets: Sales, Summary
- 15 formulas detected
- ☁️ Uploaded to Google Drive
What would you like to know about this file?"
User: "What's the total revenue in my sales file?"
Agent workflow:
1. Run: excel-workflow query "what is total revenue?" --file sales.xlsx
2. Receive data with all rows and formulas
3. Analyze the data to find revenue-related columns and totals
4. Respond with answer:
Agent: "Looking at your sales.xlsx file:
Total Revenue: 650,000 руб
Breakdown:
- iPhone: 150,000 (3 × 50,000)
- MacBook: 200,000 (2 × 100,000)
- iPad: 300,000 (5 × 60,000)
The file has a SUM formula in cell D5 that calculates this automatically."
User: "Change iPhone quantity to 20"
Agent workflow:
1. Query to understand structure: excel-workflow query "find iPhone row"
2. Identify that iPhone is in row 2, quantity in column C
3. Run: excel-workflow update '{"C2": 20}' --file sales.xlsx
4. Confirm update:
Agent: "✅ Updated sales.xlsx:
Changed C2 (iPhone quantity): 3 → 20
New revenue for iPhone: 1,000,000 руб (was 150,000)
Total revenue updated automatically thanks to formulas!
File has been re-uploaded to Google Drive."
User: "Create a column that multiplies price by 0.5 for all products"
Agent workflow:
1. Read file to determine row count
2. Generate update JSON with formulas for each row
3. Run: excel-workflow update '{"D2": "=B2*0.5", "D3": "=B3*0.5", ...}' --file prices.xlsx
4. Confirm:
Agent: "✅ Created formulas for 50 rows!
Column D now contains =B*0.5 formula for all products.
File updated on Google Drive."
data_only=FalseCommands: read, update, info, show-formulas, get-cell
Tracker — SQLite database for file metadata
~/.openclaw/excel_tracker.dbTracks: filename, sheets, formulas, paths, timestamps
Workflow Orchestrator — Integrates Excel CLI, rclone, and tracker
~/.openclaw/excel_tracker.dbgdrive:Excel/7w4.net提供免费和付费技能下载。
~/.openclaw/media/)How it works:
- openpyxl loads workbooks with data_only=False
- Formulas stored as text strings (e.g., "=B2*C2")
- When updating cell with formula string, openpyxl preserves it
- Excel recalculates formulas when file is opened
Example:
# This preserves formulas
ws['D2'] = '=B2*C2' # Formula remains
ws['B2'] = 100 # Data changes, formula in D2 recalculates
✅ Preserved: - Formulas (=SUM, =IF, =B2*C2, etc.) - Data (numbers, text, dates) - Structure (sheets, tables) - Formatting (colors, fonts, borders, bold) - Charts (diagrams update automatically)
⚠️ May Not Work: - Conditional formatting (complex rules) - Macros (.xlsm files not supported) - Pivot tables (may break) - Slicers and advanced filters
Common errors:
File not found
json
{"error": "File not found: /path/to/file.xlsx"}
Google Drive not configured
json
{"error": "rclone remote 'gdrive' not configured"}
Solution: Run rclone config
Formula syntax error
json
{"error": "Invalid formula: =B2*"}
Solution: Check formula syntax
Database locked
json
{"error": "Database is locked"}
Solution: Wait and retry
# Upload stock data
excel-workflow process ~/Desktop/ARKK.xlsx
# Query
excel-workflow query "show last 10 rows" --file ARKK.xlsx
# Add calculated column (50% of price)
# First, find row count, then generate formulas
excel-workflow update '{"C2": "=B2*0.5", "C3": "=B3*0.5", ...}' --file ARKK.xlsx
# Process price list
excel-workflow process prices.xlsx
# Update prices
excel-workflow update '{"B10": 99.99, "B11": 149.99}' --file prices.xlsx
# Add tax column
excel-workflow update '{"D2": "=B2*1.2"}' --file prices.xlsx
# Upload multiple files
excel-workflow process january.xlsx
excel-workflow process february.xlsx
# List all files
excel-workflow list
# Query specific file
excel-workflow query "total sales" --file january.xlsx
# Stats
excel-workflow stats
# Install rclone
brew install rclone # macOS
sudo apt install rclone # Linux
# Install in virtual environment
cd ~/.openclaw/tools/openclaw-excel
python3 -m venv venv
./venv/bin/pip install openpyxl
# Reconfigure rclone
rclone config
# Delete old gdrive remote and create new one
This should NOT happen! If it does:
1. Check that excel CLI uses data_only=False when loading workbook
2. Ensure formula strings start with =
3. Verify openpyxl version: pip show openpyxl (should be 3.1.0+)
sales_2026_Q1.xlsxBad: Book1.xlsx
Ask specific questions
Bad: "Tell me about the file"
Keep file structure consistent
See Excel CLI Documentation and Tracker Documentation for detailed API reference.
MIT License - see LICENSE.txt
这个 Excel Skill 文档做得比较用心,功能覆盖全面,教会你怎么处理表格、备份到云端、保留公式不被覆盖。不过它目前只有说明书,没有实际可用的程序代码,而且使用它需要配置 Google Drive 和 rclone 等外部工具,设置起来稍微麻烦。适合有一定技术基础的用户使用。