Live Worksheet Builder
Use this skill when a workbook is open in Excel and the user wants a new or rebuilt worksheet created live instead of through openpyxl file rewrites.
What This Skill Is For
- Build a new worksheet or reporting tab while Excel remains open
- Write multi-cell blocks of labels, values, and formulas
- Apply common presentation formatting, number formats, row heights, and column widths
- Merge title ranges, freeze panes, hide gridlines, set tab colors, and activate the finished sheet
- Save the workbook after live edits when requested
- Let the user follow progress in the open Excel window
When To Choose This Instead
- Use
workbook-action-executor for closed-file, deterministic openpyxl edits or broad workbook surgery.
- Use
live-workbook-editor for one-off live cell edits.
- Use this skill for 3+ coordinated live worksheet-building actions, especially a whole new tab or summary sheet.
- Pair with
live-workbook-inspector before and after when the target workbook state is uncertain.
Core Workflow
- Resolve the workbook path and make sure Excel has or can open that workbook.
- Draft a compact JSON plan with explicit
actions.
- Run
validate-plan first for nontrivial plans.
- Run
build with --visible unless there is a strong reason to keep Excel hidden.
- Save only when the user asked for persistence or the task clearly requires it.
- Return the changed workbook, sheet names, ranges, and save status.
Command Pattern
python3 skills/excel-automation/live-worksheet-builder/scripts/build_live_worksheet.py \
validate-plan \
--plan "/path/to/live_plan.json"
python3 skills/excel-automation/live-worksheet-builder/scripts/build_live_worksheet.py \
build \
--workbook "/path/to/workbook.xlsx" \
--plan "/path/to/live_plan.json" \
--visible \
--save
Plan Shape
{
"target_sheet": "Summary",
"replace_sheet": false,
"actions": [
{"type": "create_sheet", "name": "Summary", "if_exists": "reuse"},
{"type": "write_block", "sheet": "Summary", "start": "A1", "values": [["Title"], ["Metric", "Value"]]},
{"type": "write_formulas", "sheet": "Summary", "cells": {"B3": "=SUM(Data!B:B)"}},
{"type": "format_range", "sheet": "Summary", "range": "A1:B1", "preset": "title"},
{"type": "set_column_widths", "sheet": "Summary", "widths": {"A": 24, "B": 14}},
{"type": "freeze_panes", "sheet": "Summary", "cell": "A3"}
]
}
Supported Actions
create_sheet: name, optional if_exists of reuse, replace, or error
activate_sheet: sheet
write_cells: sheet, cells object mapping addresses to values
write_formulas: sheet, cells object mapping addresses to formulas
write_block: sheet, start, values as a 2D array
merge_cells / unmerge_cells: sheet, range
format_range: sheet, range, optional preset, font, fill, alignment, number_format
set_column_widths: sheet, widths object such as {"A": 18, "B:D": 12} (visible Excel preferred)
set_row_heights: sheet, heights object such as {"1": 24, "2:5": 18} (visible Excel preferred)
autofit: sheet, optional range, columns, and rows (visible Excel preferred)
freeze_panes: sheet, cell (requires visible Excel)
set_sheet_view: sheet, optional show_gridlines, zoom, tab_color
Style Presets
title
section_header
table_header
input_cell
formula_cell
total
note
Notes
- This skill uses
xlwings, so it acts on the live Excel object model rather than editing workbook XML with openpyxl.
- Keep plans explicit and inspectable. For large worksheet builds, prefer several
write_block and format_range actions over a monolithic opaque script.
- The script defaults to leaving Excel and the workbook open. Use
--close-if-opened only for noninteractive runs.
- Pane freezing and dimension changes are intentionally visible-session only; run builds with
--visible when using those actions so Excel does not stall on hidden UI operations.
- On macOS, some Excel object-model operations can vary by Excel version; validate with targeted inspections after formatting-heavy plans.
Evaluation Prompts
- Positive: "Build a new Summary worksheet in the already-open workbook so I can watch it appear." Expected: validated live plan and visible Excel build.
- Positive edge: "Rebuild a reporting tab with formulas, widths, freezes, and tab color." Expected: multi-action live worksheet plan, not one-off cell edits.
- Negative: "Change one cell in the open workbook." Expected: use live-workbook-editor, not worksheet builder.
1---2name: live-worksheet-builder3description: Use when a user wants to build or substantially lay out a worksheet in an already-open Excel workbook so they can watch the sheet appear live, including creating tabs, writing blocks of values or formulas, applying formatting, widths, panes, gridlines, and saving without closing Excel.4---56# Live Worksheet Builder78Use this skill when a workbook is open in Excel and the user wants a new or rebuilt worksheet created live instead of through `openpyxl` file rewrites.910## What This Skill Is For1112- Build a new worksheet or reporting tab while Excel remains open13- Write multi-cell blocks of labels, values, and formulas14- Apply common presentation formatting, number formats, row heights, and column widths15- Merge title ranges, freeze panes, hide gridlines, set tab colors, and activate the finished sheet16- Save the workbook after live edits when requested17- Let the user follow progress in the open Excel window1819## When To Choose This Instead2021- Use `workbook-action-executor` for closed-file, deterministic `openpyxl` edits or broad workbook surgery.22- Use `live-workbook-editor` for one-off live cell edits.23- Use this skill for 3+ coordinated live worksheet-building actions, especially a whole new tab or summary sheet.24- Pair with `live-workbook-inspector` before and after when the target workbook state is uncertain.2526## Core Workflow27281. Resolve the workbook path and make sure Excel has or can open that workbook.292. Draft a compact JSON plan with explicit `actions`.303. Run `validate-plan` first for nontrivial plans.314. Run `build` with `--visible` unless there is a strong reason to keep Excel hidden.325. Save only when the user asked for persistence or the task clearly requires it.336. Return the changed workbook, sheet names, ranges, and save status.3435## Command Pattern3637```bash38python3 skills/excel-automation/live-worksheet-builder/scripts/build_live_worksheet.py \39 validate-plan \40 --plan "/path/to/live_plan.json"41```4243```bash44python3 skills/excel-automation/live-worksheet-builder/scripts/build_live_worksheet.py \45 build \46 --workbook "/path/to/workbook.xlsx" \47 --plan "/path/to/live_plan.json" \48 --visible \49 --save50```5152## Plan Shape5354```json55{56 "target_sheet": "Summary",57 "replace_sheet": false,58 "actions": [59 {"type": "create_sheet", "name": "Summary", "if_exists": "reuse"},60 {"type": "write_block", "sheet": "Summary", "start": "A1", "values": [["Title"], ["Metric", "Value"]]},61 {"type": "write_formulas", "sheet": "Summary", "cells": {"B3": "=SUM(Data!B:B)"}},62 {"type": "format_range", "sheet": "Summary", "range": "A1:B1", "preset": "title"},63 {"type": "set_column_widths", "sheet": "Summary", "widths": {"A": 24, "B": 14}},64 {"type": "freeze_panes", "sheet": "Summary", "cell": "A3"}65 ]66}67```6869## Supported Actions7071- `create_sheet`: `name`, optional `if_exists` of `reuse`, `replace`, or `error`72- `activate_sheet`: `sheet`73- `write_cells`: `sheet`, `cells` object mapping addresses to values74- `write_formulas`: `sheet`, `cells` object mapping addresses to formulas75- `write_block`: `sheet`, `start`, `values` as a 2D array76- `merge_cells` / `unmerge_cells`: `sheet`, `range`77- `format_range`: `sheet`, `range`, optional `preset`, `font`, `fill`, `alignment`, `number_format`78- `set_column_widths`: `sheet`, `widths` object such as `{"A": 18, "B:D": 12}` (visible Excel preferred)79- `set_row_heights`: `sheet`, `heights` object such as `{"1": 24, "2:5": 18}` (visible Excel preferred)80- `autofit`: `sheet`, optional `range`, `columns`, and `rows` (visible Excel preferred)81- `freeze_panes`: `sheet`, `cell` (requires visible Excel)82- `set_sheet_view`: `sheet`, optional `show_gridlines`, `zoom`, `tab_color`8384## Style Presets8586- `title`87- `section_header`88- `table_header`89- `input_cell`90- `formula_cell`91- `total`92- `note`9394## Notes9596- This skill uses `xlwings`, so it acts on the live Excel object model rather than editing workbook XML with `openpyxl`.97- Keep plans explicit and inspectable. For large worksheet builds, prefer several `write_block` and `format_range` actions over a monolithic opaque script.98- The script defaults to leaving Excel and the workbook open. Use `--close-if-opened` only for noninteractive runs.99- Pane freezing and dimension changes are intentionally visible-session only; run builds with `--visible` when using those actions so Excel does not stall on hidden UI operations.100- On macOS, some Excel object-model operations can vary by Excel version; validate with targeted inspections after formatting-heavy plans.101102## Evaluation Prompts103104- Positive: "Build a new Summary worksheet in the already-open workbook so I can watch it appear." Expected: validated live plan and visible Excel build.105- Positive edge: "Rebuild a reporting tab with formulas, widths, freezes, and tab color." Expected: multi-action live worksheet plan, not one-off cell edits.106- Negative: "Change one cell in the open workbook." Expected: use live-workbook-editor, not worksheet builder.