# Spreadsheet

Use when tasks involve creating, editing, analyzing, or formatting spreadsheets...

- Repository: https://github.com/dp-archive/archive (1107 stars)
- Category: Documents
- License: Apache-2.0
- Last updated: 2026-03-04
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add dp-archive/archive --skill spreadsheet -g -a claude-code -y`
Codex: `npx skills add dp-archive/archive --skill spreadsheet -g -a codex -y`
Cursor: `npx skills add dp-archive/archive --skill spreadsheet -g -a cursor -y`
Gemini CLI: `npx skills add dp-archive/archive --skill spreadsheet -g -a gemini-cli -y`

## Description

Use when tasks involve creating, editing, analyzing, or formatting spreadsheets (`.xlsx`, `.csv`, `.tsv`) using Python (`openpyxl`, `pandas`), especially when formulas, references, and formatting need to be preserved and verified.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Spreadsheet Skill (Create, Edit, Analyze, Visualize)

## When to use
- Build new workbooks with formulas, formatting, and structured layouts.
- Read or analyze tabular data (filter, aggregate, pivot, compute metrics).
- Modify existing workbooks without breaking formulas or references.
- Visualize data with charts/tables and sensible formatting.

IMPORTANT: System and user instructions always take precedence.

## Workflow
1. Confirm the file type and goals (create, edit, analyze, visualize).
2. Use `openpyxl` for `.xlsx` edits and `pandas` for analysis and CSV/TSV workflows.
3. If layout matters, render for visual review (see Rendering and visual checks).
4. Validate formulas and references; note that openpyxl does not evaluate formulas.
5. Save outputs and clean up intermediate files.

## Temp and output conventions
- Use `tmp/spreadsheets/` for intermediate files; delete when done.
- Write final artifacts under `output/spreadsheet/` when working in this repo.
- Keep filenames stable and descriptive.

## Primary tooling
- Use `openpyxl` for creating/editing `.xlsx` files and preserving formatting.
- Use `pandas` for analysis and CSV/TSV workflows, then write results back to `.xlsx` or `.csv`.
- If you need charts, prefer `openpyxl.chart` for native Excel charts.

## Rendering and visual checks
- If LibreOffice (`soffice`) and Poppler (`pdftoppm`) are available, render sheets for visual review:
  - `soffice --headless --convert-to pdf --outdir $OUTDIR $INPUT_XLSX`
  - `pdftoppm -png $OUTDIR/$BASENAME.pdf $OUTDIR/$BASENAME`
- If rendering tools are unavailable, ask the user to review the output locally for layout accuracy.

## Dependencies (install if missing)
Prefer `uv` for dependency management.

The rest: https://github.com/dp-archive/archive/blob/HEAD/seed_skills/spreadsheet/SKILL.md
