Skillshub Excel Automation
Excel Automation: create workbooks, manage worksheets, read/write cell data, and format spreadsheets via Microsoft Excel and Google Sheets integration
install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ComposioHQ/awesome-claude-skills/excel-automation" ~/.claude/skills/comeonoliver-skillshub-excel-automation && rm -rf "$T"
manifest:
skills/ComposioHQ/awesome-claude-skills/excel-automation/SKILL.mdsource content
Excel Automation
Automate spreadsheet operations including creating workbooks, writing data, formatting cells, upserting rows, and managing worksheets. Works with Microsoft Excel (OneDrive) and Google Sheets.
Toolkit docs: composio.dev/toolkits/excel
Setup
This skill requires the Rube MCP server connected at
https://rube.app/mcp.
Before executing any tools, ensure an active connection exists for the
excel (and optionally googlesheets) toolkit. If no connection is active, initiate one via RUBE_MANAGE_CONNECTIONS.
Core Workflows
1. Create a New Excel Workbook
Use
EXCEL_CREATE_WORKBOOK to generate a new .xlsx file and upload it to OneDrive.
Tool:
EXCEL_CREATE_WORKBOOK
Steps:
- Call
with worksheet names and dataEXCEL_CREATE_WORKBOOK - The tool creates a
file and uploads it to OneDrive.xlsx - Use the returned file path/URL for subsequent operations
2. Write Data to a Spreadsheet
Use
GOOGLESHEETS_BATCH_UPDATE to write values to a specific range or append rows.
Tool:
GOOGLESHEETS_BATCH_UPDATE
Key Parameters:
(required) -- The spreadsheet ID from the URL (44-char alphanumeric string)spreadsheet_id
(required) -- Tab name, e.g.,sheet_name
,"Sheet1""Sales Data"
(required) -- 2D array of cell values, e.g.,values[["Name","Amount"],["Alice",100]]
-- Starting cell in A1 notation (e.g.,first_cell_location
,"A1"
). Omit to append rows"D3"
--valueInputOption
(default, parses formulas) or"USER_ENTERED"
(stores as-is)"RAW"
Example:
Tool: GOOGLESHEETS_BATCH_UPDATE Arguments: spreadsheet_id: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms" sheet_name: "Sheet1" values: [["Item","Cost","Stocked"],["Wheel",20.50,true],["Screw",0.50,true]] first_cell_location: "A1"
3. Upsert Rows by Key Column
Use
GOOGLESHEETS_UPSERT_ROWS to update existing rows by matching a key column, or append new rows if no match is found. Ideal for CRM syncs, inventory updates, and deduplication.
Tool:
GOOGLESHEETS_UPSERT_ROWS
Key Parameters:
(required) -- The spreadsheet IDspreadsheetId
(required) -- Tab namesheetName
(required) -- 2D array of data rows (min 1 row). Ifrows
is omitted, the first row is treated as headersheaders
-- Column names for the data, e.g.,headers["Email","Phone","Status"]
-- Column header to match on, e.g.,keyColumn
,"Email"
,"SKU""Lead ID"
--strictMode
(default) errors on mismatched columns;true
truncates silentlyfalse
Example:
Tool: GOOGLESHEETS_UPSERT_ROWS Arguments: spreadsheetId: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms" sheetName: "Contacts" keyColumn: "Email" headers: ["Email","Phone","Status"] rows: [["john@example.com","555-0101","Active"],["jane@example.com","555-0102","Pending"]]
4. Format Cells
Use
GOOGLESHEETS_FORMAT_CELL to apply bold, italic, font size, and background colors to ranges.
Tool:
GOOGLESHEETS_FORMAT_CELL
Key Parameters:
(required) -- The spreadsheet IDspreadsheet_id
-- Cell range in A1 notation, e.g.,range
,"A1:D1"
(recommended over index-based)"B2:B10"
-- Worksheet name, e.g.,sheet_name"Sheet1"
--bold
/truefalse
--italic
/truefalse
-- Font size in points, e.g.,fontSize12
,red
,green
-- Background color components (0.0--1.0 float scale, NOT 0--255)blue
Example (bold header row with blue background):
Tool: GOOGLESHEETS_FORMAT_CELL Arguments: spreadsheet_id: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms" range: "A1:D1" sheet_name: "Sheet1" bold: true fontSize: 12 red: 0.2 green: 0.4 blue: 0.9
5. Add New Worksheet Tabs
Use
GOOGLESHEETS_ADD_SHEET to create new tabs within an existing spreadsheet.
Tool:
GOOGLESHEETS_ADD_SHEET
Key Parameters:
(required) -- The spreadsheet IDspreadsheetId
-- Name for the new tab, e.g.,title"Q4 Report"
--forceUnique
(default) auto-appends suffix if name existstrue
Example:
Tool: GOOGLESHEETS_ADD_SHEET Arguments: spreadsheetId: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms" title: "Q4 Report" forceUnique: true
6. Read Data and Verify Content
Use
GOOGLESHEETS_BATCH_GET to retrieve data from specified cell ranges for validation or further processing.
Tool:
GOOGLESHEETS_BATCH_GET
Steps:
- Call
with the spreadsheet ID and target rangesGOOGLESHEETS_BATCH_GET - Validate headers and data alignment
- Use results to inform subsequent write or update operations
Supporting Tools:
-- List all tab names in a spreadsheetGOOGLESHEETS_GET_SHEET_NAMES
-- Get metadata (sheet IDs, properties)GOOGLESHEETS_GET_SPREADSHEET_INFO
-- Check if a specific tab existsGOOGLESHEETS_FIND_WORKSHEET_BY_TITLE
Recommended Execution Plan
- Create or locate the spreadsheet using
or reuse an existingGOOGLESHEETS_CREATE_GOOGLE_SHEET1spreadsheetId - Confirm the destination tab using
orGOOGLESHEETS_GET_SHEET_NAMES
; create it withGOOGLESHEETS_FIND_WORKSHEET_BY_TITLE
if missingGOOGLESHEETS_ADD_SHEET - Read existing headers (optional) using
to align columnsGOOGLESHEETS_BATCH_GET - Write or upsert data using
orGOOGLESHEETS_BATCH_UPDATEGOOGLESHEETS_UPSERT_ROWS - Apply formatting (optional) using
GOOGLESHEETS_FORMAT_CELL - Verify results (optional) using
GOOGLESHEETS_BATCH_GET - Fallback: If Google Sheets creation is blocked (HTTP 403), use
for localEXCEL_CREATE_WORKBOOK
output.xlsx
Known Pitfalls
| Pitfall | Detail |
|---|---|
| HTTP 403 on sheet creation | fails when Drive create scope is missing. Reuse an existing or fall back to . |
| Cell limit and rate throttling | Google Sheets has a ~5,000,000 cell limit per spreadsheet. Excessive write frequency triggers HTTP 429. Batch changes and chunk large writes (~500 rows/call). |
| Format range off-by-one | uses 0-based, endIndex-exclusive ranges when using index mode. Background color uses 0--1 float RGB, NOT 0--255 integer RGB. |
| Sheet title uniqueness | Sheet titles are not guaranteed unique across API responses. Prefer operating by numeric and verify the resolved tab before writing. |
| Upsert payload shape | requires headers + 2D rows array. Sending list-of-dicts or empty causes validation errors. Ensure at least 1 data row. |
Quick Reference
| Tool Slug | Description |
|---|---|
| Create a new workbook and upload to OneDrive |
| Write values to a range or append new rows |
| Update existing rows by key or append new ones |
| Apply text/background formatting to cell ranges |
| Add a new worksheet tab to a spreadsheet |
| Create a new Google Spreadsheet in Drive |
| List all worksheet names in a spreadsheet |
| Retrieve spreadsheet metadata |
| Check if a worksheet exists by title |
| Read data from specified cell ranges |
Powered by Composio