Skip to main content

ExcelFlow

ExcelFlow 是一个由 Excel 计划驱动的数据抽取工具。业务用户在模板中声明需要读取的 Sheet、关联方式、过滤条件、输出字段和衍生列,ExcelFlow 使用 Pandas 执行这些规则并输出 CSV、JSONL 或 Excel。

PyPI Python License: MIT

适合解决的问题

  • 从一个 Excel Sheet 中选择、重命名和转换字段。
  • 使用结构化条件筛选数据,而不需要编写代码。
  • 在同一个工作簿中关联多个 Sheet。
  • 通过安全表达式计算金额、差值和超窗天数等衍生列。
  • 按一个或多个字段分组,进行计数、求和、平均值等汇总。
  • 将同一份抽取计划保存、审核、复用和纳入版本管理。

安装

推荐使用 uv 安装为独立命令行工具:

uv tool install excelflow

也可以使用 pipx:

pipx install excelflow

详细说明参见安装指南。

五分钟快速开始

生成计划模板:

excelflow template --output extraction_plan.xlsx

填写模板后,依次校验、预览和执行。假设任务ID为 order_report,源数据为 source.xlsx:

excelflow validate --plan extraction_plan.xlsx
excelflow preview --plan extraction_plan.xlsx --task order_report
excelflow run --plan extraction_plan.xlsx --task order_report \
  --source source.xlsx --format csv --output output/order_report.csv

完整操作过程参见快速开始和模板填写完整教程。

核心能力

  • 单 Sheet 与多 Sheet 数据抽取。
  • INNER JOIN、LEFT JOIN、多级关联和复合关联键。
  • AND/OR 条件组及 13 种过滤运算符。
  • integer、decimal、string、datetime 输出类型。
  • 字符串、数值、日期、类型转换和 if_else 等安全逐行函数。
  • count、count_distinct、sum、avg、concat_agg 等分组聚合。
  • CSV、JSONL、XLSX 输出。
  • 计划校验和 Pandas 执行计划预览。

文档

示例

examples/ 提供五个递进案例:单 Sheet、过滤、关联、衍生列和分组聚合。示例计划和源数据可以直接运行。

安全边界

字段转换由受限 AST 解释器执行,不使用 Python eval()。表达式只能访问已声明的源字段、常量和受支持函数,不能执行文件操作、系统命令或任意 Python 代码。

参与项目

源码托管于 GitHub,问题和功能建议请提交到 GitHub Issues。

ExcelFlow 使用 MIT License 发布。

Metadata

Release files for excelflow 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for excelflow 0.2.0
File Size Uploaded Provenance
excelflow-0.2.0.tar.gz 149.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for excelflow 0.2.0
File Interpreter ABI Platform
excelflow-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 168.2 kB

Release files / excelflow-0.2.0.tar.gz

Download URL excelflow-0.2.0.tar.gz
Size 149.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8b3ec0a346621b86033e107032ca75da084affe8eeaeaf7dc263d756ea2b9db6
BLAKE2b-256 checksum
How to use checksums
24c180242250e898efd6e2d202f285193e7d7d944ea12ed452ac1cc0ac79ed14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / excelflow-0.2.0-py3-none-any.whl

Download URL excelflow-0.2.0-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f85210062dababee197e2c7e42fa941f831f6de62adbae262dafc381eb4ae0a5
BLAKE2b-256 checksum
How to use checksums
5ff53d4ffe88c47ec8e60870fcac80ffd4d730b4853cb5c36be74328a0c0f865
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for excelflow 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page