openpyxl-1-basic-workbook-creation

Sub-skill of openpyxl: 1. Basic Workbook Creation.

5 stars

Best use case

openpyxl-1-basic-workbook-creation is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of openpyxl: 1. Basic Workbook Creation.

Teams using openpyxl-1-basic-workbook-creation should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/1-basic-workbook-creation/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/data/office/openpyxl/1-basic-workbook-creation/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/1-basic-workbook-creation/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How openpyxl-1-basic-workbook-creation Compares

Feature / Agentopenpyxl-1-basic-workbook-creationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of openpyxl: 1. Basic Workbook Creation.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 1. Basic Workbook Creation

## 1. Basic Workbook Creation


```python
"""
Create a basic Excel workbook with data and formatting.
"""
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment, Border, Side
from openpyxl.utils import get_column_letter
from datetime import datetime

def create_basic_workbook(output_path: str) -> None:
    """Create a basic workbook with common elements."""
    # Create workbook and select active sheet
    wb = Workbook()
    ws = wb.active
    ws.title = "Sales Report"

    # Set document properties
    wb.properties.creator = "Excel Generator"
    wb.properties.title = "Monthly Sales Report"
    wb.properties.created = datetime.now()

    # Define styles
    header_font = Font(bold=True, color="FFFFFF", size=12)
    header_fill = PatternFill(start_color="4472C4", end_color="4472C4", fill_type="solid")
    header_alignment = Alignment(horizontal="center", vertical="center")

    thin_border = Border(
        left=Side(style='thin'),
        right=Side(style='thin'),
        top=Side(style='thin'),
        bottom=Side(style='thin')
    )

    # Headers
    headers = ["Product", "Q1", "Q2", "Q3", "Q4", "Total"]
    for col, header in enumerate(headers, start=1):
        cell = ws.cell(row=1, column=col, value=header)
        cell.font = header_font
        cell.fill = header_fill
        cell.alignment = header_alignment
        cell.border = thin_border

    # Data
    data = [
        ["Widget A", 1500, 1800, 2200, 2500],
        ["Widget B", 800, 950, 1100, 1300],
        ["Widget C", 2000, 2300, 2600, 2900],
        ["Widget D", 500, 600, 750, 900],
    ]

    for row_idx, row_data in enumerate(data, start=2):
        # Product name
        ws.cell(row=row_idx, column=1, value=row_data[0]).border = thin_border

        # Quarterly values
        for col_idx, value in enumerate(row_data[1:], start=2):
            cell = ws.cell(row=row_idx, column=col_idx, value=value)
            cell.border = thin_border
            cell.number_format = '#,##0'

        # Total formula
        total_cell = ws.cell(
            row=row_idx,
            column=6,
            value=f"=SUM(B{row_idx}:E{row_idx})"
        )
        total_cell.border = thin_border
        total_cell.font = Font(bold=True)
        total_cell.number_format = '#,##0'

    # Add totals row
    total_row = len(data) + 2
    ws.cell(row=total_row, column=1, value="TOTAL").font = Font(bold=True)

    for col in range(2, 7):
        col_letter = get_column_letter(col)
        cell = ws.cell(
            row=total_row,
            column=col,
            value=f"=SUM({col_letter}2:{col_letter}{total_row-1})"
        )
        cell.font = Font(bold=True)
        cell.number_format = '#,##0'
        cell.border = thin_border

    # Adjust column widths
    column_widths = [15, 12, 12, 12, 12, 14]
    for i, width in enumerate(column_widths, start=1):
        ws.column_dimensions[get_column_letter(i)].width = width

    # Freeze header row
    ws.freeze_panes = "A2"

    # Save workbook
    wb.save(output_path)
    print(f"Workbook saved to {output_path}")


create_basic_workbook("sales_report.xlsx")
```

Related Skills

staged-issue-tree-creation-with-deduplication

5
from vamseeachanta/workspace-hub

Pattern for creating hierarchical GitHub issue trees from phased project plans while checking for duplicate/overlapping issues

gh-issue-creation-full-repo-and-batch-setup

5
from vamseeachanta/workspace-hub

Create multiple related GitHub issues safely by resolving full OWNER/REPO, checking duplicates and labels first, and verifying each created issue.

excel-workbook-to-python-v2

5
from vamseeachanta/workspace-hub

Convert engineering Excel workbooks to Python code using Codex Desktop cowork on Windows. Proven superior quality vs Linux openpyxl extraction (24 vs 7 functions, 81 vs 53 tests). Validated on Ballymore jumper installation analysis.

mkdocs-basic-code-block

5
from vamseeachanta/workspace-hub

Sub-skill of mkdocs: Basic Code Block.

web-artifacts-builder-basic-template

5
from vamseeachanta/workspace-hub

Sub-skill of web-artifacts-builder: Basic Template.

usage-tracker-1-basic-usage-logging

5
from vamseeachanta/workspace-hub

Sub-skill of usage-tracker: 1. Basic Usage Logging (+1).

parallel-batch-executor-1-basic-parallel-execution-with-xargs

5
from vamseeachanta/workspace-hub

Parallel batch processing with xargs. Use when running commands concurrently over a list of items with controlled parallelism.

interactive-menu-builder-1-basic-menu-structure

5
from vamseeachanta/workspace-hub

Sub-skill of interactive-menu-builder: 1. Basic Menu Structure.

docker-1-basic-dockerfile-patterns

5
from vamseeachanta/workspace-hub

Sub-skill of docker: 1. Basic Dockerfile Patterns.

github-actions-1-basic-workflow-structure

5
from vamseeachanta/workspace-hub

Sub-skill of github-actions: 1. Basic Workflow Structure.

airflow-1-basic-dag-structure

5
from vamseeachanta/workspace-hub

Sub-skill of airflow: 1. Basic DAG Structure.

activepieces-1-basic-flow-structure

5
from vamseeachanta/workspace-hub

Sub-skill of activepieces: 1. Basic Flow Structure.