Agent skill
xlsx-to-python-step-6-calculation-block-detection
Sub-skill of xlsx-to-python: Step 6 — Calculation Block Detection.
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/step-6-calculation-block-detection
SKILL.md
Step 6 — Calculation Block Detection
Step 6 — Calculation Block Detection
Heuristic to separate calculation regions from data/lookup tables:
def detect_calculation_blocks(ws_formulas, min_formula_ratio=0.3):
"""Identify contiguous regions dominated by formulas."""
blocks = []
current_block = []
for row in ws_formulas.iter_rows():
formula_count = sum(
1 for c in row
if isinstance(c.value, str) and c.value.startswith("=")
)
total = sum(1 for c in row if c.value is not None)
if total > 0 and formula_count / total >= min_formula_ratio:
current_block.append(row[0].row)
else:
if len(current_block) >= 2:
blocks.append((current_block[0], current_block[-1]))
current_block = []
if len(current_block) >= 2:
blocks.append((current_block[0], current_block[-1]))
return blocks
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?