xlsx-editor
БесплатноБез исполняемых скриптовНе проверенSpecialized guidance for editing EXISTING Excel files with emphasis on preserving formulas, formatting, and structure across multiple tabs. Use this skill…
Об этом скилле
Excel Editor - Editing Existing Files
Overview
This skill provides specialized workflows for editing existing Excel files while preserving their integrity. It addresses the unique challenges of modifying live workbooks: maintaining formula relationships across tabs, preserving formatting and structure, ensuring data insertion maintains sort order, and guaranteeing completeness of multi-tab updates.
When to Use This Skill
Use this skill when:
- Modifying existing Excel files (not creating new ones)
- Working with multi-tab workbooks where changes must cascade correctly
- Adding data that needs to integrate with existing tables while maintaining sort order
- Updating formulas that reference cells across multiple sheets
- Preserving complex formatting, merged cells, or conditional formatting
- Ensuring all related tables across tabs are updated completely
Critical Principles for Editing Existing Files
1. Always Analyze Before Editing
Never dive directly into making changes. First understand the file's structure, dependencies, and relationships.
2. Preserve, Don't Replace
The existing file has established patterns. Maintain its structure, formulas, and formatting conventions rather than imposing new ones.
3. Multi-Tab Completeness is Mandatory
If data appears in multiple tabs, ALL instances must be updated. Missing one tab is a critical failure.
4. Validate Exhaustively
After edits, verify formulas, check for blank rows, confirm sort order, and ensure multi-tab consistency.
Pre-Edit Analysis Workflow
MANDATORY: Always perform this analysis before making any edits.
from openpyxl import load_workbook
import pandas as pd
# Load file without modifying it
wb = load_workbook('existing.xlsx', data_only=False)
# 1. INVENTORY ALL SHEETS
print("Sheets in workbook:", wb.sheetnames)
for sheet_name in wb.sheetnames:
sheet = wb[sheet_name]
print(f"\n{sheet_name}:")
print(f" Dimensions: {sheet.dimensions}")
print(f" Max row: {sheet.max_row}, Max col: {sheet.max_column}")
# 2. IDENTIFY DATA STRUCTURES
# For each sheet, identify:
# - Table boundaries (first/last row and column)
# - Header rows
# - Sort keys (which columns determine order)
# - Merged cells
for sheet_name in wb.sheetnames:
sheet = wb[sheet_name]
print(f"\nMerged cells in {sheet_name}:", list(sheet.merged_cells))
# 3. MAP FORMULAS AND DEPENDENCIES
# Find all formulas and note cross-sheet references
for sheet_name in wb.sheetnames:
sheet = wb[sheet_name]
formulas = []
for row in sheet.iter_rows():
for cell in row:
if cell.value and isinstance(cell.value, str) and cell.value.startswith('='):
formulas.append({
'cell': cell.coordinate,
'formula': cell.value,
'cross_sheet': '!' in cell.value
})
if formulas:
print(f"\n{sheet_name} has {len(formulas)} formulas")
cross_sheet = [f for f in formulas if f['cross_sheet']]
if cross_sheet:
print(f" {len(cross_sheet)} have cross-sheet references")
for f in cross_sheet[:3]: # Show first 3 examples
print(f" {f['cell']}: {f['formula']}")
# 4. UNDERSTAND SORT ORDER
# Read data to understand current ordering
for sheet_name in wb.sheetnames:
df = pd.read_excel('existing.xlsx', sheet_name=sheet_name)
if not df.empty:
print(f"\n{sheet_name} current sort:")
print(f" First 5 rows of first column: {df.iloc[:5, 0].tolist()}")
print(f" Last 5 rows of first column: {df.iloc[-5:, 0].tolist()}")
Document findings before proceeding:
- Which sheets contain related data?
- What formulas reference other sheets?
- What determines sort order?
- Where are merged cells or complex formatting?
- What is the established naming/structure pattern?
Core Editing Workflows
Workflow 1: Updating Cell Values While Preserving Formulas
Use case: Changing data values without breaking formula dependencies.
from openpyxl import load_workbook
# Load with formulas intact
wb = load_workbook('existing.xlsx', data_only=False)
sheet = wb['SheetName']
# CORRECT: Update value, preserve formula context
cell = sheet['A5']
if cell.value and isinstance(cell.value, str) and cell.value.startswith('='):
print(f"WARNING: A5 contains formula: {cell.value}")
print("Updating this will DELETE the formula. Proceed? (update dependent formulas instead)")
else:
cell.value = new_value
# For cells with formulas, update the formula itself or its dependencies
sheet['B10'] = '=SUM(A1:A9)' # Updates formula, preserving calculation logic
wb.save('existing.xlsx')
Critical checks:
- Verify you're not overwriting formula cells with values
- Check if other cells reference the cell you're updating
- Test a few formulas to ensure they still work after the change
Workflow 2: Adding Rows While Maintaining Structure
Use case:
Установить xlsx-editor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл xlsx-editor?
Specialized guidance for editing EXISTING Excel files with emphasis on preserving formulas, formatting, and structure across multiple tabs. Use this skill when modifying, updating, or adding data to existing .xlsx files where maintaining integrity is critical—particularly for multi-tab workbooks, complex formulas, formatted tables, and data that must maintain sort order and relationships across sheets.
Как установить скилл xlsx-editor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл xlsx-editor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic