Loading...
Loading...
Read and edit live Excel workbooks stored in OneDrive / SharePoint via the Microsoft Graph workbook API. Use when the user mentions an Excel file, a spreadsheet on OneDrive, reading a range or table, appending rows, updating cells, or listing worksheets in a cloud .xlsx.
npx skill4agent add acedatacloud/skills microsoft-excelcurl + jq$MICROSOFT_EXCEL_TOKENAuthorization: Bearer $MICROSOFT_EXCEL_TOKENhttps://graph.microsoft.com/v1.0ITEM_ID{"error":{"code","message"}}message401403G="https://graph.microsoft.com/v1.0"; AUTH="Authorization: Bearer $MICROSOFT_EXCEL_TOKEN"
# Find the workbook by name (then take .id as ITEM_ID)
curl -sS -H "$AUTH" "$G/me/drive/root/search(q='budget.xlsx')" \
| jq '.value[] | {id, name, webUrl}'
# Worksheets in the workbook
curl -sS -H "$AUTH" "$G/me/drive/items/ITEM_ID/workbook/worksheets" \
| jq '.value[] | {id, name, position}'ITEM="ITEM_ID"; WS="Sheet1"
# Used range (values + formulas + formats)
curl -sS -H "$AUTH" \
"$G/me/drive/items/$ITEM/workbook/worksheets/$WS/usedRange" \
| jq '{address, values: .values}'
# Read a specific range
curl -sS -H "$AUTH" \
"$G/me/drive/items/$ITEM/workbook/worksheets/$WS/range(address='A1:C5')" | jq '.values'
# Update a range (confirm first). values is a 2-D array matching the address shape.
curl -sS -X PATCH -H "$AUTH" -H "Content-Type: application/json" \
-d '{"values":[["Q3",1200],["Q4",1580]]}' \
"$G/me/drive/items/$ITEM/workbook/worksheets/$WS/range(address='A2:B3')" | jq '.address'curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d '{"values":[["2026-06-21","Acme",4200]]}' \
"$G/me/drive/items/$ITEM/workbook/tables/Table1/rows/add" | jq '.index'addressSheet1!A1:C5A1:C5valuesworkbook-session-id