openclawkit-excel

v1.0.1

Excel文件操作工具套件,提供基础的Excel文件读写、数据处理和报表生成功能。

0· 118·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for wanghao20150901/openclawkit-excel.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "openclawkit-excel" (wanghao20150901/openclawkit-excel) from ClawHub.
Skill page: https://clawhub.ai/wanghao20150901/openclawkit-excel
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install openclawkit-excel

ClawHub CLI

Package manager switcher

npx clawhub@latest install openclawkit-excel
Security Scan
VirusTotalVirusTotal
Pending
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description (Excel read/write, cleaning, reporting) match the included Python modules; declared Python deps (pandas, openpyxl) are appropriate and used in the code. No unrelated credentials, binaries, or services are requested.
!
Instruction Scope
SKILL.md documents many CLI commands and examples (e.g., convert, report, --input flag for merge) that do not match the actual scripts/main.py implementation (which exposes demo, check, read, create, clean, merge with different argument names like --files). Examples and API usage in the README also assume certain return types (e.g., read_excel returning a DataFrame) that in the code return a dict of DataFrames. There are also mismatches where example data types (lists/dicts) are passed where methods expect DataFrames; these are functional bugs and could cause runtime errors. While not malicious, this scope creep/inconsistency means the runtime behavior may differ from documentation.
Install Mechanism
No install spec (instruction-only) and the SKILL.md correctly lists pip requirements. The package includes source files in scripts/, but there is no download-from-URL or archive install behavior. This is low risk from an installation perspective.
Credentials
The skill requests no environment variables, credentials, or config paths. The code does not access environment secrets or network endpoints (no requests/urllib/subprocess usage detected in the provided files).
Persistence & Privilege
always is false and the skill does not request persistent or elevated agent privileges. It does not modify other skills or system-wide configs in the provided code.
Assessment
This skill appears to be a local Excel helper and doesn't request credentials or use the network, which is good. However: 1) SKILL.md examples and flags (convert, report, --input, etc.) don't fully match the CLI implemented in scripts/main.py — expect some commands in the docs to be missing or to use different flags. 2) There are functional inconsistencies (e.g., read_excel returns a dict of DataFrames but examples treat it as a single DataFrame; demo/example code may pass plain lists where the implementation expects DataFrames) that will likely cause runtime errors. 3) The code included is not obfuscated and looks benign, but it appears partially incomplete/truncated in the package you provided; treat this as unpolished rather than malicious. Suggested next steps before installing or running in a production context: run the package in an isolated environment (sandbox/VM), inspect the remainder of openclawkit_excel.py (the provided copy was truncated), run unit tests on the main CLI flows you need, and avoid pointing the tool at sensitive directories or files until you're satisfied with behavior. If you need the documented features that are missing, request the author clarify or update the repository before trusting it with important data.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

📈 Clawdis
excelvk97e3axaycavrzejjgm61bzzsd83rmnalatestvk97e3axaycavrzejjgm61bzzsd83rmna
118downloads
0stars
1versions
Updated 1mo ago
v1.0.1
MIT-0

Excel工具套件 (Excel Toolkit)

功能概述

这是一个功能完整的Excel文件操作工具套件,提供基础的Excel文件读写、数据处理和报表生成功能。

核心功能

  • 📁 文件操作:创建、读取、写入、合并Excel文件
  • 📊 数据处理:数据清洗、转换、分析
  • 🔧 格式设置:单元格格式、样式、图表
  • 📈 报表生成:多工作表报表、统计图表
  • 🔍 数据验证:数据完整性检查、错误处理

使用时机

使用此工具当:

  • 需要批量处理Excel文件
  • 需要自动化Excel报表生成
  • 需要进行数据清洗和转换
  • 需要合并多个Excel文件
  • 需要创建复杂的Excel模板

环境要求

  • Python 3.6+
  • 依赖包:
    • pandas (数据处理)
    • openpyxl (Excel文件操作)

安装依赖:

pip install pandas openpyxl

使用方法

命令行使用

# 查看帮助
python scripts/main.py --help

# 合并多个Excel文件
python scripts/main.py merge --input "file1.xlsx,file2.xlsx" --output merged.xlsx

# 转换CSV到Excel
python scripts/main.py convert --input data.csv --output data.xlsx

# 数据清洗
python scripts/main.py clean --input raw_data.xlsx --output clean_data.xlsx

# 生成统计报表
python scripts/main.py report --input sales.xlsx --output sales_report.xlsx

Python API使用

from openclawkit_excel import ExcelToolkit

# 初始化工具
excel = ExcelToolkit(debug=True)

# 创建Excel文件
data = {
    '姓名': ['张三', '李四', '王五'],
    '年龄': [25, 30, 35],
    '部门': ['技术部', '市场部', '销售部']
}
excel.create_excel('员工信息.xlsx', data)

# 读取Excel文件
df = excel.read_excel('员工信息.xlsx')
print(df)

# 数据清洗
cleaned_df = excel.clean_data(df)
excel.write_excel('清洗后数据.xlsx', cleaned_df)

功能模块

1. 文件操作模块

  • 创建新Excel文件
  • 读取现有Excel文件
  • 写入数据到Excel
  • 合并多个Excel文件
  • 拆分Excel文件

2. 数据处理模块

  • 数据清洗(去重、填充空值、格式转换)
  • 数据转换(类型转换、编码转换)
  • 数据筛选(条件筛选、随机抽样)
  • 数据聚合(分组统计、透视表)

3. 格式设置模块

  • 单元格格式(字体、颜色、对齐)
  • 数字格式(货币、百分比、日期)
  • 条件格式(数据条、色阶、图标集)
  • 图表生成(柱状图、折线图、饼图)

4. 报表生成模块

  • 多工作表报表
  • 统计摘要报表
  • 数据透视报表
  • 可视化报表

5. 数据验证模块

  • 数据类型验证
  • 数据范围验证
  • 唯一性验证
  • 业务规则验证

示例代码

基础示例

from openclawkit_excel import ExcelToolkit

# 创建工具实例
excel = ExcelToolkit()

# 检查文件是否存在
if excel.file_exists('data.xlsx'):
    # 读取文件
    df = excel.read_excel('data.xlsx')
    
    # 数据清洗
    df_clean = excel.clean_data(df)
    
    # 保存清洗后的数据
    excel.write_excel('data_clean.xlsx', df_clean)
    
    # 生成统计报表
    excel.generate_report(df_clean, 'report.xlsx')

高级示例

from openclawkit_excel import ExcelToolkit

excel = ExcelToolkit(debug=True)

# 合并多个文件
files = ['q1.xlsx', 'q2.xlsx', 'q3.xlsx', 'q4.xlsx']
merged_df = excel.merge_files(files, merge_on='日期')
excel.write_excel('年度数据.xlsx', merged_df)

# 创建复杂报表
report_data = {
    'summary': excel.generate_summary(merged_df),
    'monthly': excel.group_by_month(merged_df),
    'top10': excel.get_top_items(merged_df, '销售额', 10),
    'trend': excel.calculate_trend(merged_df, '销售额')
}

excel.create_multi_sheet_report('年度分析报告.xlsx', report_data)

错误处理

工具包含完善的错误处理机制:

  • 文件不存在或损坏处理
  • 数据格式错误处理
  • 内存不足处理
  • 并发访问处理

性能优化

  • 批量处理:支持大文件分批处理
  • 内存映射:减少内存占用
  • 并行计算:多核CPU加速
  • 缓存机制:减少重复计算

更新日志

v1.0.1 (2026-03-28)

  • 初始版本发布
  • 基础文件操作功能
  • 数据处理和清洗功能
  • 报表生成功能
  • 完整的错误处理

许可证

MIT License

作者

浩哥 (Hao Ge)

反馈与贡献

欢迎提交Issue和Pull Request:

Comments

Loading comments...