科研技能库/电子表格处理
数据分析
未发现用户侧风险

电子表格处理

创建、编辑、分析、清洗或转换电子表格,支持 XLSX、CSV、TSV 格式,以及公式、图表和表格报告。

文件预览

1 个文件
SKILL.md
1.4 KB · 可预览
---
name: spreadsheets
description: Create, edit, analyze, clean, or convert spreadsheets including XLSX, CSV, TSV, formulas, charts, and tabular reports.
---

# Spreadsheets

Use this skill when the input or deliverable is a spreadsheet: `.xlsx`, `.xlsm`,
`.csv`, `.tsv`, or a table that should become one of those formats.

## Workflow

1. Identify whether the task is cleaning, analysis, formatting, charting, or
   workbook generation.
2. Preserve source files. Write a new output workbook unless the user asked for
   an in-place edit.
3. Use appropriate tools:
   - Python `csv` or `pandas` for data cleaning and analysis
   - `openpyxl` for XLSX formulas, styles, tables, filters, freeze panes, and
     charts
   - LibreOffice only when conversion or recalculation is needed and available
4. Keep raw data separate from summary sheets when that helps auditability.
5. Use formulas when the workbook should remain interactive; use fixed values
   when the result must be stable and reproducible.
6. Verify by loading the workbook, checking sheet names, row/column counts,
   formulas, and representative cell values. For CSV/TSV, check delimiters,
   quoting, headers, and row widths.

If dependencies are missing, ask before installing packages. Never silently
drop rows, change date/time semantics, or coerce IDs with leading zeroes into
numbers.

SKILL.md

元数据
namespreadsheets
description创建、编辑、分析、清洗或转换电子表格,包括 XLSX、CSV、TSV、公式、图表和表格报告。

电子表格

当输入或交付物是电子表格时使用此技能:.xlsx、.xlsm、.csv、.tsv,或应成为其中一种格式的表格。

工作流程

  1. 确定任务是清洗、分析、格式化、图表制作还是工作簿生成。
  2. 保留源文件。除非用户要求原地编辑,否则写入新的输出工作簿。
  3. 使用适当的工具:
    • Python csv 或 pandas 进行数据清洗和分析
    • openpyxl 用于 XLSX 公式、样式、表、筛选器、冻结窗格和图表
    • 仅在需要转换或重新计算且可用时使用 LibreOffice
  4. 当有助于可审计性时,将原始数据与摘要表分开。
  5. 当工作簿应保持交互性时使用公式;当结果必须稳定且可重现时使用固定值。
  6. 通过加载工作簿,检查工作表名称、行/列计数、公式和代表性单元格值进行验证。对于 CSV/TSV,检查分隔符、引号、标题和行宽。

如果缺少依赖项,在安装包之前询问。切勿静默删除行、更改日期/时间语义或将带有前导零的 ID 强制转换为数字。