askill
excel-spreadsheets

excel-spreadsheetsSafety 95Repository

Create, modify, and manage Excel spreadsheets with openpyxl via Bedrock Code Interpreter.

106 stars
2.1k downloads
Updated 3/4/2026

Package Files

Loading files...
SKILL.md

Excel Spreadsheets

When to Use

ToolUse When
create_excel_spreadsheetUser asks to create/generate a NEW spreadsheet
modify_excel_spreadsheetUser asks to edit/update an EXISTING spreadsheet
list_my_excel_spreadsheetsUser asks what spreadsheets are available
read_excel_spreadsheetUser wants to download or read spreadsheet contents
preview_excel_sheetsCheck actual sheet appearance when editing

Workflow

  1. Before modifying: call preview_excel_sheets to check current layout.
  2. After creation/modification: call preview_excel_sheets to verify.
  3. Run tools sequentially (never parallel) to prevent file race conditions.

Professional Formatting

  • Font: Arial for all cells unless an existing template specifies otherwise.
  • Negative numbers: parentheses format (1,234) — not minus -1,234.
  • Currency: $#,##0 format. Specify units in headers (e.g., "Revenue ($mm)").
  • Percentages: 0.0% (one decimal place).
  • Years: format as text ("2024" not "2,024").
  • Zeros: display as "-" using a custom number format.
# Example: professional number formatting
from openpyxl.styles import numbers
ws['B2'].number_format = '$#,##0'          # Currency
ws['C2'].number_format = '0.0%'            # Percentage
ws['D2'].number_format = '#,##0;(#,##0)'   # Negative in parentheses
ws['E2'].number_format = '@'               # Year as text
ws['F2'].number_format = '#,##0;(#,##0);"-"'  # Zeros as dash

Financial Model Color Coding

When building financial models, apply these conventions:

ColorHexUsage
Blue text0000FFHardcoded inputs and assumptions
Black text000000All formulas and calculations
Green text008000Links pulling from other worksheets
Yellow backgroundFFFF00Key assumptions needing attention
from openpyxl.styles import Font, PatternFill
ws['B2'].font = Font(name='Arial', color='0000FF')       # Blue: input
ws['B3'].font = Font(name='Arial', color='000000')       # Black: formula
ws['B4'].font = Font(name='Arial', color='008000')       # Green: cross-sheet link
ws['B5'].fill = PatternFill('solid', fgColor='FFFF00')   # Yellow bg: key assumption

Images

from openpyxl.drawing.image import Image
ws.add_image(Image('file.png'), 'E1')

Code Rules

  • Workbook is pre-initialized as wb = Workbook(), active sheet as ws = wb.active (create), or loaded as wb (modify). Do NOT include Workbook() or wb.save().
  • Available libraries: openpyxl, matplotlib, pandas, numpy (seaborn NOT available)
  • ALWAYS use Excel formulas, NEVER hardcode calculated values.
    • Wrong: ws['B10'] = total
    • Right: ws['B10'] = '=SUM(B2:B9)'
  • Place assumptions in separate cells, reference them in formulas (e.g., =B5*(1+$B$6) not =B5*1.05).
  • Avoid circular references.
  • Filenames: letters, numbers, hyphens only.

Tool Reference

create_excel_spreadsheet

Create a new Excel spreadsheet using openpyxl code.

ParameterTypeRequiredDescription
python_codestrYesPython code using openpyxl (see Code Rules above)
spreadsheet_namestrYesFilename without extension (letters, numbers, hyphens only)

Example tool_input:

{
  "python_code": "ws.title = 'Sales'\nws['A1'] = 'Quarter'\nws['B1'] = 'Revenue'\nfor i, (q, r) in enumerate(zip(['Q1','Q2','Q3','Q4'], [100,150,130,180]), start=2):\n    ws[f'A{i}'] = q\n    ws[f'B{i}'] = r",
  "spreadsheet_name": "quarterly-sales"
}

WARNING: Parameter is spreadsheet_name, NOT filename or name.

modify_excel_spreadsheet

Modify an existing spreadsheet and save with a new name.

ParameterTypeRequiredDescription
source_namestrYesExisting spreadsheet name (without .xlsx)
output_namestrYesNew output name (MUST differ from source)
python_codestrYesPython code to modify the spreadsheet

Example tool_input:

{
  "source_name": "quarterly-sales",
  "output_name": "quarterly-sales-v2",
  "python_code": "ws = wb.active\nws['B6'] = '=SUM(B2:B5)'"
}

list_my_excel_spreadsheets

List all spreadsheets in workspace. No parameters needed.

read_excel_spreadsheet

Retrieve a specific spreadsheet for download.

ParameterTypeRequired
spreadsheet_namestrYes

preview_excel_sheets

Get sheet screenshots for visual inspection before editing.

ParameterTypeRequiredDescription
spreadsheet_namestrYesSpreadsheet name without extension
sheet_nameslist[str]YesSheet names to preview

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

90/100Analyzed 2/19/2026

Highly actionable skill document with clear tool selection guidance, comprehensive formatting rules (professional and financial modeling), code examples, and detailed tool reference. Strong structure with tables and when-to-use guidance. Minor issues: tag mismatch (github-actions), some internal-specific tool names limit broader reuse but core content is well-structured and accurate.

95
95
70
95
90

Metadata

Licenseunknown
Version-
Updated3/4/2026
Publisheraws-samples

Tags

github-actions