Skip to main content

ex2val

将 Excel 公式转换为值。

安装

pip install ex2val

使用方法

命令行

# 基本用法 - 输出文件自动添加 _vyyyyMMdd 后缀
ex2val 输入.xlsx
# 输出: 输入_v20260424.xlsx

# 指定输出文件
ex2val 输入.xlsx 输出.xlsx

# 使用占位符动态命名
ex2val "报表_{yyyy}{mm}{dd}.xlsx"
# 输出: 报表_20260424.xlsx(解析占位符)

ex2val "报表_{yyyymmdd -1}.xlsx"
# 输出: 报表_20260423.xlsx(昨天)

# 也支持 python -m 方式调用
python -m ex2val 输入.xlsx

占位符

占位符 说明 示例
{yyyy} 当前年份(小写) 2026
{mm} 当前月份(小写) 04
{dd} 当前日期(小写) 24
{HH} 当前小时(大写) 15
{MM} 当前分钟(大写) 30
{SS} 当前秒数(大写) 45
{tmp} 空字符串
{v} vyyyyMMdd 格式 v20260424
{yyyymmdd} 今天 yyyymmdd 20260424
{yyyymmdd -1} 昨天 20260423
{yyyymmdd 1} 明天 20260425

Python API

from ex2val import convert, Placeholder

# 转换文件
convert("输入.xlsx", "输出.xlsx")

# 使用占位符
Placeholder.yyyy()         # "2026"
Placeholder.yyyymmdd()     # "20260424"
Placeholder.yyyymmdd(-1)   # "20260423"(昨天)

右键菜单 / 快速操作

命令行方式(推荐):

# 添加右键菜单
ex2val --install-menu

# 卸载右键菜单
ex2val --uninstall-menu

Windows: 安装后右键点击任意文件即可选择"转换为值(ex2val)"。

macOS: 安装后在 Finder 中右键点击文件,选择"快速操作" → "转换为值(ex2val)"。

注意:macOS 新添加的服务需要在「系统设置」→「键盘」→「键盘快捷键」→「服务」中手动启用。

功能特性

  • 将 Excel 公式转换为静态值
  • 支持日期占位符动态命名
  • 删除以 - 开头的 sheet
  • Windows 右键菜单集成
  • macOS 快速操作集成

许可证

MIT

Metadata

Release files for ex2val 0.1.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 ex2val 0.1.0
File Size Uploaded Provenance Actions
ex2val-0.1.0.tar.gz 9.5 kB Without provenance Details for ex2val-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 19.3 kB

Release files / ex2val-0.1.0.tar.gz

Download URL ex2val-0.1.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a1168596e3db689b6fc68fcfd1ee9d8ff77909392c104f44ee41101686b7b7a0
BLAKE2b-256 checksum
How to use checksums
91f5d598f4914cad81cbe6e39689e8f398bd51566604c821080b69592b82d564
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / ex2val-0.1.0-py3-none-any.whl

Download URL ex2val-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac35d624d809cdac7c35c70174bcfff7666496b5b67a1fc5f65c802ff8623d45
BLAKE2b-256 checksum
How to use checksums
e0c833e8ac8158182a652db6a601f6cc2b0d571c53c72dee3a601c98def2a828
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for ex2val 0.1.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.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