timesheet-split

Split a multi-project personnel standard timesheet Excel for the “Zhizu” business into separate files by project/organization. Designed for workbooks containing three sheets (Sheet1 summary pivot, timesheet daily detail summary, and personnel-to-entity mapping), it strictly preserves the original formatting (HLOOKUP formulas, merged cells, total rows, signature rows) while only filtering employees and replacing project numbers and project names. Trigger phrases: timesheet split, split timesheet Excel by project, split timesheet summary.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "timesheet-split" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-c96dcf79ccdc90a0fa033cb06a56d0f13cc53c11648ec9204e67ed5e76994cee. Verify the upstream source and version against https://skillhub.cn/skills/user_2d9e4ad2/timesheet-split before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Split a multi-project personnel standard timesheet Excel for the “Zhizu” business into separate files by project/organization. Designed for workbooks containing three sheets (Sheet1 summary pivot, timesheet daily detail summary, and personnel-to-entity mapping), it strictly preserves the original formatting (HLOOKUP formulas, merged cells, total rows, signature rows) while only filtering employees and replacing project numbers and project names. Trigger phrases: timesheet split, split timesheet Excel by project, split timesheet summary.

0 Downloads

Introduction source: third_party · user_2d9e4ad2 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: timesheet-split
slug: timesheet-split
displayName: 工时表按项目拆分
version: 1.0.0
description: 按项目/组织拆分"智租业务"标准工时 Excel。当用户需要将含多项目人员的工时表(含 Sheet1 工时汇总透视表、工时汇总表每日明细、人员对应公司主体三个 Sheet)拆成多个独立文件,且要求严格保留原始格式(HLOOKUP 公式、合并单元格、合计行、签字行)只过滤员工+替换项目号与项目名称时使用。触发词:工时拆分、工时表拆分、按项目拆Excel、工时汇总表拆分。

工时表按项目拆分 (timesheet-split)

Overview

将一个包含多个项目人员工时的标准「智租业务数字化运营」Excel,按项目(组织)拆分成多个独立 Excel 文件。核心约束是:严格保留原始「工时汇总表」的格式,只做两件事——过滤员工(仅保留本项目人员)+ 替换项目号/项目名称。其余所有元素(HLOOKUP 公式、合并单元格、合计行 SUM、制表人签字行)原样保留。

标准源表结构

拆分前必须先确认源表符合以下结构(用 openpyxl 读取核对):

Sheet 关键内容 注意事项
Sheet1 工时汇总透视表 B1 = 项目名称;A 列员工姓名(约第 5 行起);员工行之后有「总计」行;C 列起每日工时,AG 列总计
工时汇总表 每日工时明细 A2="项目号:XXXX";E2==Sheet1!B1(跟随项目名);表头约 5 行;员工行(约第 6 行起)每日工时用 HLOOKUP 引用 Sheet1;含「合计」行与「制表人签字」行
人员对应公司主体 员工↔组织 A序号 B姓名 C公司主体

拆分流程

第 1 步:确认拆分依据

向用户确认(或根据截图/Sheet3 推断):

  • 每个项目的 项目名称、项目编号
  • 每个项目对应的 员工名单(来自 Sheet3「人员对应公司主体」的组织映射)
  • 输出文件名

第 2 步:准备配置文件

生成 projects.json:

{
  "projects": [
    {
      "name": "两轮换电全链路数字化运营系统",
      "code": "SW2023006a",
      "output": "产研202605-两轮换电全链路数字化运营系统.xlsx",
      "people": ["何俊宏", "王章环", "吴尚慧"]
    },
    {
      "name": "智租业务数字化运营系统",
      "code": "SW2023006",
      "output": "产研202605-智租业务数字化运营系统.xlsx",
      "people": ["贾旭影", "蒋丹枫", "刘云龙", "邵文彬"]
    }
  ]
}

第 3 步:运行拆分脚本

python3 ~/.workbuddy/skills/timesheet-split/scripts/split_timesheet.py \
  --source <源文件.xlsx> \
  --config projects.json \
  --output-dir <输出目录>

脚本自动完成:复制源文件 → 删除非项目员工行(从下往上 delete_rows,openpyxl 自动处理合并单元格)→ Sheet1 总计行重算(空列补 0)→ 工时汇总表 HLOOKUP 的 index 按员工在 Sheet1 的新行号重映射 → 合计行 SUM 收缩到实际员工行 → A2 项目号替换 → Sheet3 过滤人员。

第 4 步:验证(必须)

用 openpyxl 逐文件核对:

  1. 合并单元格范围与原始一致
  2. A2 项目号已替换;E2 仍为 =Sheet1!B1
  3. 员工行 = 预期名单;HLOOKUP 公式 index 正确
  4. 「合计」行 SUM 公式范围 = B6:B{末员工行}
  5. 「制表人签字」行保留
  6. Sheet1 总计行无空列(空列应为 0)

关键坑点(务必遵守)

  1. 绝不用 data_only=True 把公式写成静态值——用户要求保留 HLOOKUP 公式,静态值会破坏"打开 Excel 自动重算"的预期。最小改动原则:只过滤 + 替换项目号。
  2. HLOOKUP index 必须随 Sheet1 删行而重映射:index = 员工在Sheet1的新行号 - table_array起始行 + 1。原始 Sheet1!$4:$25 起始行为 4,故 index = 新行号 - 3。不重映射会导致引用错位(显示 0 或错误数据)。
  3. 删除行用 delete_rows 从下往上删,避免行号错位;openpyxl 会自动收缩落在删除范围内的合并单元格。
  4. 合计行 SUM 必须收缩:原始模板预留到第 20 行(=SUM(B6:B20)),删员工后需改为实际末员工行,否则合计包含空行(虽为 0 但格式不严谨)。
  5. Sheet1 总计行空列补 0:原表某些日期列全项目无人填报,过滤后该行应为 0 而非留空,保证 HLOOKUP 引用与显示一致。
  6. 「制表人签字」行不要删:它是原始表尾的固定结构,删除员工行后会自动上移,保留即可。
  7. 项目名称(E2)保持公式 =Sheet1!B1,不要写死——这样改 Sheet1 的 B1 即全局生效。

Resources

  • scripts/split_timesheet.py:核心拆分脚本,参数化接受源文件 + projects.json 配置,自动探测表结构并执行最小改动拆分。

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 解决企业多项目工时拆分的实际痛点
  • 严格保留原始格式(HLOOKUP、合并单元格、签字行)
  • 适用于智租业务标准工时表结构
Trigger Precision85/100

Highlights

  • 触发词覆盖完整:工时拆分、工时表拆分、按项目拆Excel、工时汇总表拆分
  • 边界清晰,无歧义
Structure and Standards92/100

Areas to improve

  • 缺少 When to Use 章节 Reported severity: Minor

    文档结构完整但未显式包含 When to Use 章节

    Recommendation: 建议在 Overview 后增加 When to Use 章节,明确适用场景

Highlights

  • Phase/步骤清晰(4 步拆分流程)
  • 含端到端示例(projects.json + 命令行调用)
  • frontmatter 完整,单文件未超限
Execution Reliability88/100

Highlights

  • 工具来源明确(openpyxl + 自定义脚本)
  • 覆盖主要异常(行号错位、HLOOKUP 重映射、合并单元格处理)
  • 有详细验证清单(6 项核对点)
Evidence Verifiability (mean of the first four)86/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.