Agent skill
spreadsheet-tools
Guides and code for creating, analyzing, and formatting spreadsheets. Use this skill to work with Excel files programmatically and apply data analysis techniques.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/spreadsheet-tools
Metadata
Additional technical details for this skill
- category
- data
SKILL.md
Spreadsheet Tools Manual
Overview
This skill provides instructions and code for manipulating spreadsheets, generating formulas, and analyzing data.
Working with pandas and openpyxl
Reading and Writing Excel Files
import pandas as pd
# Read Excel file
df = pd.read_excel('data.xlsx', sheet_name='Sheet1')
# Write DataFrame to a new Excel file
df.to_excel('output.xlsx', index=False)
Applying Formulas
from openpyxl import load_workbook
wb = load_workbook('output.xlsx')
ws = wb.active
# Insert formula into cell C2
ws['C2'] = '=SUM(A2:B2)'
wb.save('output_with_formula.xlsx')
Pivot Tables
# Create a pivot table
pivot = df.pivot_table(values='Sales', index='Region', columns='Quarter', aggfunc='sum')
pivot.to_excel('pivot_table.xlsx')
Charts in Excel
import xlsxwriter
workbook = xlsxwriter.Workbook('chart.xlsx')
worksheet = workbook.add_worksheet()
chart = workbook.add_chart({'type': 'line'})
# Write some data
data = [10, 40, 50, 20, 10, 50]
worksheet.write_column('A1', data)
# Configure chart
chart.add_series({'values': '=Sheet1!$A$1:$A$6'})
chart.set_title({'name': 'Sample Data'})
chart.set_x_axis({'name': 'Index'})
chart.set_y_axis({'name': 'Value'})
worksheet.insert_chart('C1', chart)
workbook.close()
Excel Best Practices
- Use separate sheets for raw data, analysis, and results.
- Name ranges and use table references for clarity.
- Avoid hardcoding values in formulas; use cell references.
- Document complex formulas with comments or a README.
Analytical Techniques
- Descriptive statistics: mean, median, standard deviation.
- Filtering and sorting: use pandas'
query()andsort_values(). - Time series analysis: convert date columns to datetime objects; resample using
df.resample().
Additional Resources
- pandas documentation.
- openpyxl and xlsxwriter docs.
- Excel Jet for formula tips.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?