← 返回
未分类 中文

Microsoft Excel

Microsoft Excel API integration with managed OAuth. Read and write Excel workbooks, worksheets, ranges, tables, and charts stored in OneDrive. Use this skill...
通过托管 OAuth 集成 Microsoft Excel API,实现对 OneDrive 中 Excel 工作簿、工作表、区域、表格和图表的读写。使用此技能...
hith3sh hith3sh 来源
未分类 clawhub v1.0.5 2 版本 99765 Key: 无需
★ 6
Stars
📥 1,578
下载
💾 1
安装
2
版本
#latest

概述

Microsoft Excel

!Microsoft Excel

Access Microsoft Excel via the Microsoft Graph API with managed OAuth authentication. Read and write workbooks, worksheets, ranges, tables, and charts stored in OneDrive or SharePoint.

This skill uses ClawLink for hosted connection flows and credentials so you do not need to configure Microsoft Excel API access yourself.

Setup in 3 Steps

Step 1: InstallStep 2: Pair AccountStep 3: Connect Excel
:---::---::---:
!Install!Pair!Connect
Run the install command in OpenClawSign in and approve the deviceOpen the dashboard and connect Microsoft Excel

How It Works

┌─────────────────┐     ┌──────────────┐     ┌──────────────────┐
│   OpenClaw      │────▶│   ClawLink   │────▶│ Microsoft Graph  │
│   (User Chat)   │     │   (OAuth)    │     │   (Excel API)    │
└─────────────────┘     └──────────────┘     └──────────────────┘
         │                       │                       │
         │  1. Install Plugin    │                       │
         │  2. Pair Device       │                       │
         │  3. Connect Excel     │                       │
         │                       │  4. Secure Token      │
         │                       │  5. Proxy Requests    │
         │                       │                       │
         ▼                       ▼                       ▼
   ┌──────────┐           ┌──────────┐           ┌──────────┐
   │  SKILL   │           │ Dashboard│           │ OneDrive │
   │  File    │           │ Auth     │           │ Excel    │
   └──────────┘           └──────────┘           └──────────┘

Install

Install the verified ClawLink plugin from ClawHub. After the user confirms, complete the full setup so ClawLink tools are visible in the next OpenClaw chat.

openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart

Then tell the user: "OpenClaw has been restarted. Send /new as a standalone message to start a fresh chat, then ask for Microsoft Excel again."

Quick Start

# List worksheets in a workbook
clawlink_call_tool --tool "excel_list_worksheets" --params '{"file_id": "WORKBOOK_ID"}'

# Read a cell range
clawlink_call_tool --tool "excel_get_range" --params '{"file_id": "WORKBOOK_ID", "worksheet_name": "Sheet1", "range_address": "A1:B10"}'

# Update a cell range
clawlink_call_tool --tool "excel_update_range" --params '{"file_id": "WORKBOOK_ID", "worksheet_name": "Sheet1", "range_address": "A1:B2", "values": [["Name", "Age"], ["Alice", 30]]}'

Authentication

All Microsoft Excel tool calls are authenticated automatically by ClawLink using the user's connected Microsoft account.

No API key is required in chat. ClawLink stores the OAuth token securely and injects it into every Microsoft Graph request on the user's behalf.

Getting Connected

  1. Install the ClawLink plugin (see Install above).
  2. Pair the plugin with clawlink_begin_pairing if it is not configured yet.
  3. Open https://claw-link.dev/dashboard?add=microsoft-excel and connect Microsoft Excel.
  4. Call clawlink_list_integrations to verify the connection is active.

Connection Management

List Connections

clawlink_list_integrations

Response: Returns all connected integrations. Look for microsoft-excel in the list.

Verify Connection

clawlink_list_tools --integration microsoft-excel

Response: Returns the live tool catalog for Microsoft Excel.

Reconnect

If Microsoft Excel tools are missing or the connection shows an error:

  1. Direct the user to https://claw-link.dev/dashboard?add=microsoft-excel
  2. After they confirm, call clawlink_list_integrations to verify
  3. Then call clawlink_list_tools --integration microsoft-excel

Workbook Access Patterns

You can access workbooks using either OneDrive or SharePoint paths:

By File ID (OneDrive):

clawlink_call_tool --tool "excel_get_workbook" --params '{"file_id": "YOUR_FILE_ID"}'

By File Path (OneDrive):

clawlink_call_tool --tool "excel_search_files" --params '{"query": "workbook.xlsx"}'

SharePoint workbooks:

Use the sharepoint variants of tools (e.g., excel_get_sharepoint_worksheet, excel_update_sharepoint_range).

Security & Permissions

  • Access is scoped to workbooks, worksheets, tables, and cell data within the connected Microsoft account.
  • All write operations require explicit user confirmation. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
  • Destructive actions (delete worksheet, clear range, delete table row/column) are marked as high-impact and must be confirmed.
  • Workbook permissions can be inspected with excel_list_workbook_permissions and granted with excel_add_workbook_permission.

Tool Reference

Drive & File Operations

ToolDescriptionMode
-------------------------
excel_search_filesSearch OneDrive for Excel workbook IDs by name or queryRead
excel_list_filesList files and folders in a drive root or pathRead
excel_list_drive_item_childrenList immediate children of a folder with paginationRead
excel_create_workbookCreate a new .xlsx file with worksheets and data in OneDriveWrite
excel_upload_workbookUpload an external Excel file from a URL into OneDrive/SharePointWrite
excel_export_workbook_to_pdfExport an Excel workbook to PDF via Microsoft GraphWrite

Session Management

ToolDescriptionMode
-------------------------
excel_get_sessionCreate a persistent workbook session for batch operationsWrite
excel_close_sessionClose an active workbook session to release locksWrite

Note: Sessions expire after ~5 minutes of inactivity (persistent) or ~7 minutes (non-persistent). Pass the session_id in subsequent write operations when available.

Worksheet Operations

ToolDescriptionMode
-------------------------
excel_list_worksheetsList all worksheets in a workbookRead
excel_get_worksheetGet a worksheet by name or IDRead
excel_add_worksheetAdd a new worksheet to a workbookWrite
excel_update_worksheetRename or reposition a worksheetWrite
excel_delete_worksheetDelete a worksheet from the workbookWrite
excel_protect_worksheetProtect a worksheet from editingWrite
excel_get_worksheet_used_rangeGet the active data region of a worksheetRead

Range Operations

ToolDescriptionMode
-------------------------
excel_get_rangeRead values, formulas, and formatting from a cell rangeRead
excel_update_rangeUpdate values and formatting in a cell rangeWrite
excel_clear_rangeClear contents, formats, or both from a rangeWrite
excel_insert_rangeInsert cells, shifting existing content down or rightWrite
excel_sort_rangeSort a range by one or more columnsWrite
excel_merge_cellsMerge cells in a worksheet rangeWrite

Table Operations

ToolDescriptionMode
-------------------------
excel_list_tablesList all tables in a worksheetRead
excel_get_table_columnGet a specific table column by ID or nameRead
excel_list_table_columnsList all columns in a tableRead
excel_list_table_rowsList all rows in a tableRead
excel_add_tableCreate a new table from a rangeWrite
excel_update_tableUpdate table properties (name, style, totals)Write
excel_add_table_rowAppend a row to a tableWrite
excel_add_table_columnAppend a column to a tableWrite
excel_delete_table_rowDelete a row from a table by indexWrite
excel_delete_table_columnDelete a column from a table by indexWrite
excel_apply_table_filterApply a filter to a table columnWrite
excel_clear_table_filterClear an existing filter from a tableWrite
excel_apply_table_sortApply a sort to a tableWrite
excel_convert_table_to_rangeConvert a table back to a plain rangeWrite

Chart Operations

ToolDescriptionMode
-------------------------
excel_list_chartsList all charts in a worksheetRead
excel_list_chart_seriesList data series in a chartRead
excel_get_chart_axisRetrieve axis properties (min, max, interval)Read
excel_get_chart_data_labelsRetrieve chart data label settingsRead
excel_get_chart_legendRetrieve chart legend visibility and formattingRead
excel_add_chartAdd a new chart to a worksheetWrite
excel_update_chartUpdate an existing chartWrite
excel_update_chart_legendUpdate chart legend position or formattingWrite

SharePoint Operations

ToolDescriptionMode
-------------------------
excel_list_sharepoint_worksheetsList worksheets in a SharePoint workbookRead
excel_get_sharepoint_worksheetGet a worksheet from a SharePoint workbookRead
excel_get_sharepoint_rangeRead a range from a SharePoint worksheetRead
excel_update_sharepoint_rangeUpdate a range in a SharePoint worksheetWrite
excel_list_sharepoint_tablesList tables in a SharePoint worksheetRead
excel_add_sharepoint_worksheetAdd a worksheet to a SharePoint workbookWrite

Workbook Metadata

ToolDescriptionMode
-------------------------
excel_get_workbookRetrieve workbook properties, tables, and worksheetsRead
excel_list_named_itemsList named ranges and items in a workbookRead
excel_list_commentsList all comments in a workbookRead
excel_list_workbook_permissionsList sharing permissions on a workbook fileRead
excel_add_workbook_permissionGrant access to a workbook via inviteWrite

Code Examples

Read a range

clawlink_call_tool --tool "excel_get_range" \
  --params '{
    "file_id": "YOUR_FILE_ID",
    "worksheet_name": "Sheet1",
    "range_address": "A1:C10"
  }'

Update a range

clawlink_call_tool --tool "excel_update_range" \
  --params '{
    "file_id": "YOUR_FILE_ID",
    "worksheet_name": "Sheet1",
    "range_address": "A1:B2",
    "values": [["Updated", "Values"], [100, 200]]
  }'

Create a table

clawlink_call_tool --tool "excel_add_table" \
  --params '{
    "file_id": "YOUR_FILE_ID",
    "worksheet_name": "Sheet1",
    "address": "A1:C4",
    "has_headers": true
  }'

Add a table row

clawlink_call_tool --tool "excel_add_table_row" \
  --params '{
    "file_id": "YOUR_FILE_ID",
    "table_name": "Table1",
    "values": [["Carol", 35, "Chicago"]]
  }'

Add a chart

clawlink_call_tool --tool "excel_add_chart" \
  --params '{
    "file_id": "YOUR_FILE_ID",
    "worksheet_name": "Sheet1",
    "type": "ColumnClustered",
    "source_data": "A1:C4",
    "series_by": "Auto"
  }'

Discovery Workflow

  1. Call clawlink_list_integrations to confirm Microsoft Excel is connected.
  2. Call clawlink_list_tools --integration microsoft-excel to see the live catalog.
  3. Treat the returned list as the source of truth. Do not guess or assume what tools exist.
  4. If the user describes a capability but the exact tool is unclear, call clawlink_search_tools with a short query and integration microsoft-excel.
  5. If no Microsoft Excel tools appear, direct the user to https://claw-link.dev/dashboard?add=microsoft-excel.

Execution Workflow

┌─────────────────────────────────────────────────────────────┐
│  READ OPERATIONS (Safe)                                     │
│  list → get → search → describe → call                      │
│                                                             │
│  Example: List worksheets → Read range → Show results       │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│  WRITE OPERATIONS (Require Confirmation)                    │
│  list → get → describe → preview → confirm → call           │
│                                                             │
│  Example: Describe tool → Preview changes → User approves   │
│           → Execute update                                  │
└─────────────────────────────────────────────────────────────┘
  1. For unfamiliar tools, ambiguous requests, or any write action, call clawlink_describe_tool first.
  2. Use the returned guidance, schema, whenToUse, askBefore, safeDefaults, examples, and followups to shape the call.
  3. Prefer read, list, search, and get operations before writes when that reduces ambiguity.
  4. For writes or anything marked as requiring confirmation, call clawlink_preview_tool first.
  5. Execute with clawlink_call_tool. Pass confirmation only after the preview matches the user's intent.
  6. If the tool call fails, report the real error. Do not invent results or restate the failure as a missing capability unless the live catalog supports that conclusion.

Notes

  • Only .xlsx files are supported (not legacy .xls).
  • Worksheet names with special characters may need URL encoding when using direct Graph paths.
  • Table and worksheet IDs containing { and } must be URL-encoded (%7B and %7D) in raw Graph URLs. ClawLink handles this automatically.
  • Use null in value arrays to skip updating specific cells.
  • Blank cells should use "" (empty string).
  • Range addresses use A1 notation (e.g., A1:C10, Sheet1!A1:B5).
  • When piping shell output, environment variables may not expand correctly in some shells; prefer explicit JSON parameters.

Error Handling

Status / ErrorMeaning
-------------------------
Tool not foundThe tool name does not exist in the current catalog. Verify with clawlink_list_tools --integration microsoft-excel.
Missing connectionMicrosoft Excel is not connected. Direct the user to https://claw-link.dev/dashboard?add=microsoft-excel.
ItemNotFoundFile or resource does not exist. Check the file_id or path.
ItemAlreadyExistsWorksheet or table with that name already exists.
InvalidArgumentInvalid parameter or missing required field. Review the tool schema with clawlink_describe_tool.
SessionNotFoundSession expired or does not exist. Create a new session with excel_get_session.
Write rejectedUser did not confirm a write action. Always confirm before executing writes.

Troubleshooting: Tools Not Visible

  1. Check that the ClawLink plugin is installed:

```bash

openclaw plugins list

```

  1. If the plugin is installed but tools are missing, tell the user to send /new as a standalone message to reload the catalog.
  2. If a fresh chat does not help, run:

```bash

openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json

openclaw gateway restart

```

  1. After restart, tell the user to send /new again and retry.

Troubleshooting: Invalid Tool Call

  1. Ensure the integration slug is exactly microsoft-excel.
  2. Use clawlink_describe_tool to verify parameter names and types before calling.
  3. For write operations, always call clawlink_preview_tool first.

Resources

Related Skills

  • Google Sheets — For Google Workspace spreadsheet operations
  • OneDrive — For general OneDrive file management
  • SharePoint — For SharePoint site and file operations

Powered by ClawLink — an integration hub for OpenClaw

!ClawLink Logo

版本历史

共 2 个版本

  • v1.0.5 当前
    2026-06-09 16:10 安全 安全
  • v0.1.0
    2026-05-21 13:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

GitHub

hith3sh
通过 GitHub REST 和GraphQL API 与仓库、议题、拉取请求、提交、分支、发布和工作流进行交互。在需要时使用此技能。
★ 6 📥 1,780

Google Maps

hith3sh
Google Maps 与 Places API 集成。搜索地点、地理编码地址、计算路线、获取导航指示并检索位置数据。适用于需要位置服务的场景。
★ 7 📥 1,694

Notion Assistant

hith3sh
搜索页面和数据库、更新内容、管理 Notion 工作区数据,支持从聊天中读取、创建或修改 Notion 页面...
★ 8 📥 1,772