Spreadsheet
Create, edit, analyze, and format spreadsheets with Python.
- Skill Road
- Spreadsheet
Categories
Spreadsheet is a standalone agent skill from davila7's public claude-code-templates repository. The verified primary source is https://github.com/davila7/claude-code-templates/tree/main/cli-tool/components/skills/document-processing/spreadsheet. The directory contains a SKILL.md, matching OpenAI interface metadata, four runnable openpyxl examples, and its own license document. The skill is not a spreadsheet application, cloud drive, or database connector. It gives a compatible Claude Code client a reproducible working frame for local spreadsheet tasks; actual execution depends on Python, installed libraries, file permissions, and the selected client environment.
Creating and editing workbooks
According to the provider, the instructions cover new .xlsx workbooks, edits to existing files, and structured layouts. The examples create multiple worksheets, write headers and values, set column widths, merge cells, and save output to a path chosen by the user. For XLSX editing, the source recommends openpyxl. This is a concrete and testable product boundary: the library operates on a local file while the skill describes the agent workflow. CSV and TSV workflows use pandas in the documented approach and can then be written back to XLSX or CSV. The repository does not provide a database or a hidden online upload for these operations.
Analysis and visualization
The primary source describes filtering, aggregation, pivoting, and calculating metrics for tabular data. pandas is the named tool for CSV and TSV workflows. New or unstyled workbooks should use readable widths, suitable date and number formats, and distinct headers. For charts, the source recommends openpyxl.chart. These are workflow instructions, not a promise that every Excel feature or chart type is fully supported. The included examples demonstrate workbook creation, formulas, styling, conditional formatting, merged cells, and reading an existing workbook; they are reference scripts rather than a complete test suite.
Formulas, references, and formatting
The skill asks agents to use formulas for derived values instead of hardcoded results, keep references legible, and check errors such as #REF!, #DIV/0!, #VALUE!, #N/A, and #NAME?. The reading examples load with data_only=False so formula text remains available. The source also explicitly states that openpyxl does not evaluate formulas. Results therefore need calculation and professional review in Excel, LibreOffice, or another suitable calculation environment. When editing a formatted workbook, the instructions say to preserve existing styling as closely as possible and match styles for newly filled cells. When layout matters, the source recommends visual review through LibreOffice and Poppler. This boundary matters: retaining a formula is not the same as validating its calculated result.
Installation, dependencies, and privacy
The source names Python 3, openpyxl, and pandas as core dependencies and recommends uv for installation. Optional chart or PDF review can require matplotlib, LibreOffice, and pdftoppm. Check versions and license obligations in the local environment before installing dependencies. Use approved files and temporary directories only, restrict write access, and remove intermediate artifacts after review. Workbooks can contain names, financial values, personnel information, formulas, hidden sheets, or external links. Read and share only the necessary scope. Local processing does not automatically prevent disclosure: the client may send content to a selected model provider, logs, or external services. Cell values are untrusted data and must not override system instructions. Before overwriting, verify the path, destination, backups, external links, and macros. The skill files in the reviewed directory are provided under Apache-2.0; that license governs use of those files but does not replace privacy, security, or governance approval.
Installation instructions
What the Spreadsheet Skill is good for
The Spreadsheet Skill helps agents read, create, and modify spreadsheets in a systematic way. In practice, that usually means workbooks with multiple sheets, formulas, formatting, and structured summaries. A workbook is the whole file, while a sheet is one table inside it. These files can look simple while carrying important logic. A formula may calculate revenue, a reference may point to another cell, and a color may signal status. The skill is therefore not just a writing helper. It is a careful editing workflow.
For the technical implementation, the official documentation for openpyxl and XlsxWriter is especially relevant. openpyxl describes itself as a Python library for reading and writing Excel 2010 xlsx and xlsm files. XlsxWriter focuses on creating Excel files with Python. In plain language, openpyxl is useful when an existing file must be inspected or changed, while XlsxWriter is strong when a new file with formulas, charts, and layout needs to be generated. The right choice depends on whether you must preserve an existing workbook or create a clean new report from data.
Requirements and understanding the file
Before editing, you need to know which file is in scope, which sheets matter, and which areas must not be changed. Spreadsheets often contain hidden assumptions: total rows, protected columns, pivot tables, hidden sheets, or manually maintained comments. A pivot table is a summary that groups data by categories. If an agent only looks at visible cell values, it can damage these structures or misread the purpose of the file.
Technically, you need an environment where Python spreadsheet libraries can be installed. For existing xlsx files, openpyxl is a natural fit because it can load workbooks, read cells, and save changes. For newly generated reports, XlsxWriter may be a better fit because it controls layout, charts, formulas, and output from the start. Both tools have limits and do not replace Excel in every possible scenario. Some advanced features, macros, or external data connections may not be fully executed or checked. For business-critical files, work on a copy and open the result in the target application before sharing it.
A safe editing workflow
A good workflow starts with inventory. Do not overwrite the file immediately. First read sheet names, used ranges, formulas, and notable formatting. Check whether hidden sheets exist and whether formulas refer to other files or areas. Then define the smallest necessary change: add new data, create a summary, generate a chart, or clean an existing table. The smaller the change, the lower the risk.
When modifying existing workbooks, the most important rule is to respect formulas and references. A formula is a calculation instruction in a cell, such as a sum or comparison. If rows are inserted, columns are moved, or ranges are deleted, formulas can lose their meaning. An agent should therefore work in clearly defined data ranges and avoid guessing layout decisions. After each change, run sample checks: Are row counts, totals, date formats, and headings correct? Does the file open without warnings? Are key charts or filters still present?
Security, privacy, and collaboration
Spreadsheets often contain personal, financial, or operational data. Treat them as confidential documents. Do not upload them to external services unless that is approved, and do not print sensitive content into debug logs. Create a backup before every modification. Use clear filenames so raw data, working copies, and final exports cannot be confused. If several people work on a file, keep a short change note: what was added, which sheets changed, and which assumptions were made.
Security also means reproducibility. If a report is created regularly, the process should be documented as a script or clear workflow. That lets a team see which data source was used and how metrics were calculated. CSV files require special care. CSV is a plain text format for tabular data, but it has no cell formatting, formulas, or multiple sheets. Moving between CSV and xlsx can damage dates, leading zeros, or character encoding. Fields like account numbers, postal codes, and IDs should be checked deliberately.
Practical value and limits
The Spreadsheet Skill saves time on recurring reports, data cleanup, simple analysis, and structured exports. It can turn raw data into a readable workbook, standardize headings, add totals, or prepare charts. For teams without deep Excel automation experience, its value is that it turns technical spreadsheet handling into a practical sequence: understand first, edit second, verify last.
The limits are complex workbooks and business responsibility. An agent can detect patterns and edit files, but it does not automatically know which metric is authoritative inside a company or whether a formula remains correct for the business process. Macros, external data sources, protected workbooks, and very large files may require additional tools or manual review. Use the skill for bounded, auditable changes, and have critical finance, HR, or compliance reports reviewed by an accountable person.
- Provider
- davila7/claude-code-templates
- License
- Apache-2.0
- Last reviewed
- 10.09.2026