Agent skill
xlsx-to-python-using-formulas-for-complex-workbooks
Sub-skill of xlsx-to-python: Using `formulas` for Complex Workbooks.
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/data/office/xlsx-to-python/using-formulas-for-complex-workbooks
SKILL.md
Using formulas for Complex Workbooks
Using formulas for Complex Workbooks
For spreadsheets with VLOOKUP, INDEX/MATCH, nested IF, or cross-sheet chains,
use the formulas library instead of manual parsing:
import formulas
def compile_xlsx_to_function(filepath: str, input_range: str, output_range: str):
"""Compile an Excel workbook into a callable Python function."""
xl_model = formulas.ExcelModel().loads(filepath).finish()
# Get full dependency graph
solution = xl_model.calculate()
# Compile reusable function
func = xl_model.compile(
inputs=[input_range],
outputs=[output_range],
)
return func, solution
# Usage:
func, solution = compile_xlsx_to_function(
"pile_capacity.xlsx",
"'Inputs'!B2:B15",
"'Results'!C5:C10",
)
# The solution dict contains all computed values — use as test assertions
expected = solution["'Results'!C5"]
Dependency graph visualization:
# Requires: uv add formulas[plot]
xl_model = formulas.ExcelModel().loads("calculation.xlsx").finish()
xl_model.calculate()
# Access the internal dispatcher for graph analysis
dsp = xl_model.dsp
dsp.plot() # matplotlib visualization
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?