← 返回 Skills 市场
xuri

Excelize

作者 xuri · GitHub ↗ · v0.0.1 · MIT-0
cross-platform ✓ 安全检测通过
196
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install excelize
功能描述
Use when you need to reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets.
使用说明 (SKILL.md)

\r \r

Description\r

\r Package excelize-py is a Python port of Go Excelize library, providing a set of functions that allow you to write and read from XLAM / XLSM / XLSX / XLTM / XLTX files. Supports reading and writing spreadsheet documents generated by Microsoft Excel™ 2007 and later. Supports complex components by high compatibility, and provided streaming API for generating or reading data from a worksheet with huge amounts of data. This library needs Python version 3.9 or later. The full API docs can be found at docs reference.\r \r

Basic Usage\r

\r

Installation\r

\r

pip install excelize\r
```\r
\r
### Create spreadsheet\r
\r
Here is a minimal example usage that will create spreadsheet file.\r
\r
```python\r
import excelize\r
\r
f = excelize.new_file()\r
try:\r
    # Create a new sheet.\r
    index = f.new_sheet("Sheet2")\r
    # Set value of a cell.\r
    f.set_cell_value("Sheet2", "A2", "Hello world.")\r
    f.set_cell_value("Sheet1", "B2", 100)\r
    # Set active sheet of the workbook.\r
    f.set_active_sheet(index)\r
    # Save spreadsheet by the given path.\r
    f.save_as("Book1.xlsx")\r
except (RuntimeError, TypeError) as err:\r
    print(err)\r
finally:\r
    err = f.close()\r
    if err:\r
        print(err)\r
```\r
\r
### Reading spreadsheet\r
\r
The following constitutes the bare to read a spreadsheet document.\r
\r
```python\r
import excelize\r
\r
try:\r
    f = excelize.open_file("Book1.xlsx")\r
except (RuntimeError, TypeError) as err:\r
    print(err)\r
    exit()\r
try:\r
    # Get value from cell by given worksheet name and cell reference.\r
    cell = f.get_cell_value("Sheet1", "B2")\r
    print(cell)\r
    # Get all the rows in the Sheet1.\r
    rows = f.get_rows("Sheet1")\r
    for row in rows:\r
        for cell in row:\r
            print(f"{cell}	", end="")\r
        print()\r
except (RuntimeError, TypeError) as err:\r
    print(err)\r
finally:\r
    # Close the spreadsheet.\r
    err = f.close()\r
    if err:\r
        print(err)\r
```\r
\r
### Add chart to spreadsheet file\r
\r
With Excelize chart generation and management is as easy as a few lines of code. You can build charts based on data in your worksheet or generate charts without any data in your worksheet at all.\r
\r
\x3Cp align="center">\x3Cimg width="650" src="https://github.com/xuri/excelize-py/raw/main/chart.png" alt="Excelize">\x3C/p>\r
\r
```python\r
import excelize\r
\r
f = excelize.new_file()\r
data = [\r
    [None, "Apple", "Orange", "Pear"],\r
    ["Small", 2, 3, 3],\r
    ["Normal", 5, 2, 4],\r
    ["Large", 6, 7, 8],\r
]\r
try:\r
    for idx, row in enumerate(data):\r
        cell = excelize.coordinates_to_cell_name(1, idx + 1, False)\r
        f.set_sheet_row("Sheet1", cell, row)\r
    chart = excelize.Chart(\r
        type=excelize.ChartType.Col3DClustered,\r
        series=[\r
            excelize.ChartSeries(\r
                name="Sheet1!$A$2",\r
                categories="Sheet1!$B$1:$D$1",\r
                values="Sheet1!$B$2:$D$2",\r
            ),\r
            excelize.ChartSeries(\r
                name="Sheet1!$A$3",\r
                categories="Sheet1!$B$1:$D$1",\r
                values="Sheet1!$B$3:$D$3",\r
            ),\r
            excelize.ChartSeries(\r
                name="Sheet1!$A$4",\r
                categories="Sheet1!$B$1:$D$1",\r
                values="Sheet1!$B$4:$D$4",\r
            ),\r
        ],\r
        title=[excelize.RichTextRun(text="Fruit 3D Clustered Column Chart")],\r
    )\r
    f.add_chart("Sheet1", "E1", chart)\r
    # Save spreadsheet by the given path.\r
    f.save_as("Book1.xlsx")\r
except (RuntimeError, TypeError) as err:\r
    print(err)\r
finally:\r
    err = f.close()\r
    if err:\r
        print(err)\r
```\r
\r
### Add picture to spreadsheet file\r
\r
```python\r
import excelize\r
\r
try:\r
    f = excelize.open_file("Book1.xlsx")\r
except (RuntimeError, TypeError) as err:\r
    print(err)\r
    exit()\r
try:\r
    # Insert a picture.\r
    f.add_picture("Sheet1", "A2", "image.png", None)\r
    # Insert a picture to worksheet with scaling.\r
    f.add_picture("Sheet1", "D2", "image.jpg", excelize.GraphicOptions(\r
        scale_x=0.5,\r
        scale_y=0.5,\r
    ))\r
    # Insert a picture offset in the cell with printing support.\r
    f.add_picture("Sheet1", "H2", "image.gif", excelize.GraphicOptions(\r
        print_object=True,\r
        lock_aspect_ratio=False,\r
        offset_x=15,\r
        offset_y=10,\r
        locked=False,\r
    ))\r
    # Save the spreadsheet with the origin path.\r
    f.save()\r
except (RuntimeError, TypeError) as err:\r
    print(err)\r
finally:\r
    # Close the spreadsheet.\r
    err = f.close()\r
    if err:\r
        print(err)\r
```\r
\r
## References\r
\r
- Source Code: [github.com/xuri/excelize-py](https://github.com/xuri/excelize-py)\r
- Docs Repo: [github.com/xuri/excelize-py-docs](https://github.com/xuri/excelize-py-docs)\r
- PyPI: [pypi.org/project/excelize](https://pypi.org/project/excelize)\r
安全使用建议
This skill is essentially documentation/examples for the excelize-py library and does not request secrets or system access. Before installing the package with pip: (1) prefer a virtualenv or isolated environment, (2) verify the PyPI package and author (check download counts, recent releases, and GitHub repo), and (3) inspect the upstream GitHub source if you have concerns. Also be cautious when opening untrusted XLSM/XLAM files—those formats can contain macros; this library appears to read/write files but does not justify running embedded macros. If you need higher assurance, review the package code and dependencies before installing.
功能分析
Type: OpenClaw Skill Name: excelize Version: 0.0.1 The skill bundle provides documentation and usage examples for the 'excelize' Python library, which is a legitimate port of the Go Excelize library for handling Microsoft Excel files. The content in SKILL.md consists of standard installation instructions and code snippets for creating, reading, and modifying spreadsheets, with no evidence of malicious intent, data exfiltration, or prompt injection. All external links point to the official project repositories and documentation hosted on GitHub and xuri.me.
能力评估
Purpose & Capability
Name/description match the instructions: SKILL.md documents the excelize-py Python library for reading and writing Excel formats (XLSX, XLSM, etc.). No unrelated capabilities, binaries, or credentials are requested.
Instruction Scope
Runtime instructions are limited to example Python code and a recommendation to install the excelize package via pip. The SKILL.md references external docs and examples but does not instruct reading unrelated system files, accessing credentials, or exfiltrating data.
Install Mechanism
No install spec in the skill bundle (instruction-only). The README recommends 'pip install excelize' which is the expected way to obtain the library from PyPI; this is standard but carries normal supply-chain considerations for any pip package.
Credentials
The skill declares no required environment variables, credentials, or config paths. The examples operate on local spreadsheet files only, which is proportionate to the stated purpose.
Persistence & Privilege
always:false and no install or configuration changes are requested. The skill does not request permanent presence or elevated agent-wide privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install excelize
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /excelize 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.1
Initial release of the excelize skill. - Enables reading and writing Microsoft Excel™, Apple Numbers, WPS, OpenOffice spreadsheets (XLAM, XLSM, XLSX, XLTM, XLTX) in Python. - Supports creating, reading, and modifying spreadsheets, including charts and images. - Compatible with files generated by Excel 2007 and later. - Requires Python 3.9 or newer. - Includes examples for creating spreadsheets, reading data, adding charts, and inserting images.
元数据
Slug excelize
版本 0.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Excelize 是什么?

Use when you need to reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 196 次。

如何安装 Excelize?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install excelize」即可一键安装,无需额外配置。

Excelize 是免费的吗?

是的,Excelize 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Excelize 支持哪些平台?

Excelize 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Excelize?

由 xuri(@xuri)开发并维护,当前版本 v0.0.1。

💬 留言讨论