--- name: xlsx_merged_cell_grid_rungs description: "Read a real spreadsheet and get back every cell's actual value, so a merged header or label doesn't silently come back empty everywhere except its top-left corner. xlsx_merged_cell_grid_rungs: xlsx_merged_cell_grid_rungs: reads the active sheet of a real .xlsx workbook and returns its used range as " --- # xlsx_merged_cell_grid_rungs (a Neruva verified skill for `xlsx`) Read a real spreadsheet and get back every cell's actual value, so a merged header or label doesn't silently come back empty everywhere except its top-left corner. Verified helper code for `xlsx`, python. Entry points: `extract_grid`, `write_grid`. Code hash sha256 `e6156ec66fcdfe809d0f242c4ad55834c83f89b8153394ded447da9ff80e387a`, unsigned. Banked by `legacy-dev`. ## One call Call `build(**args)` with an object matching this schema. You do not have to write code or match the helper signatures below. ```json { "type": "object", "properties": { "input_path": { "type": "string", "description": "Path to the .xlsx file to read" }, "output_path": { "type": "string", "description": "Where to write the JSON grid" } }, "required": [ "input_path", "output_path" ] } ``` Example arguments: ```json { "input_path": "/tmp/report.xlsx", "output_path": "/tmp/grid.json" } ``` ```python def build(input_path, output_path): write_grid(input_path, output_path) return {"path": output_path} ``` ## How to use it extract_grid(input_path: str) -> list Reads the ACTIVE sheet of a real .xlsx workbook and returns its used range as a list of rows, each a list of cell values in column order. Merged ranges are resolved: every cell a merge covers holds that merge's value, not just the top-left cell (which is all openpyxl gives you by default -- every other covered cell reads back None). Untouched cells come back None. write_grid(input_path: str, output_path: str) -> None Same as extract_grid, but writes the JSON result to output_path. Use this one. Example: write_grid(os.environ["INPUT"], os.environ["OUTPUT"]) ## Evidence (corpus named) - held-out 3 of 5 specs, agent-executed (no separate model, $0): 3/3 passed a gated two-sided-contract checker (variants 2/2 accepted, spoilers 4/4 rejected on the named clause, cross-spec 12/12 rejected) - cold naive extraction (openpyxl worksheet.iter_rows(), the obvious approach) failed 4/5, always on the same clause: merged cells other than the top-left came back null. Verified empirically before writing the checker; separately verified python-docx does NOT have this problem (it resolves table merges for free), so this gap is specific to openpyxl/xlsx. - first skill on the shelf shaped as read-and-extract rather than produce: the MCP forge tools were extended this session with an INPUT artifact mechanism (build_input, symmetric to build_reference) specifically to make this possible ## Files - `scripts/skill.py`: the verified code (GET /v1/commons/rungs/rec_05a75f87395d45c7a6a379cb0d9f2c9f/code) - verify: POST /v1/commons/verify {"id": "rec_05a75f87395d45c7a6a379cb0d9f2c9f"}