[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EEZZR53JZ8RRK2R1Z7AXE2":3,"skill-same:01M7EEZZR53JZ8RRK2R1Z7AXE2":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7EEZZR53JZ8RRK2R1Z7AXE2","sheetops",null,"Use when reading, validating or changing Excel\u002FCSV data with SheetOps.","Zalos-io\u002Fzalos-sheetops","Zalos-io","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F223897509?v=4","01M7EEZWZYAEV0KF2NVRADC8KE","Zalos","01M7EEZX0GQ8SN3FA9CBCBN2K3",1,"MIT","https:\u002F\u002Fgithub.com\u002FZalos-io\u002Fzalos-sheetops\u002Fblob\u002Fmain\u002Fskills\u002Fcodex\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: sheetops\ndescription: Use when reading, validating or changing Excel\u002FCSV data with SheetOps.\n---\n\n# SheetOps\n\n## Data-analysis workflow\n\nUse the documented Python APIs below directly on the supplied files. This task\nuses an installed spreadsheet library; a successful import in the analysis\nscript checks availability. The validated read supplies the data evidence.\n\n1. Start the analysis script with the documented imports and the actual reader.\n   Use given paths, sheets, header rows, encodings and delimiters. Inspect once\n   only when a required source coordinate is unknown.\n2. Validate each entire required population, then compute the requested controls\n   on the loaded rows. Reuse the receipts and rows for all report fields.\n3. Construct and save the requested JSON in that same execution, including its\n   requested blocked shape when a control rejects. Print compact findings.\n\nFinish when the requested report is saved and every applicable control has\npassed or its blocker is reported. A successful import plus these receipts\ncompletes availability\u002Fdata checks. Extra package browsing or manual parser\nreimplementation adds no control. Use a heredoc or a writable working directory.\n\nFor an unexpected API\u002Fimport error, resolve the specific gap with the callable's\nsignature\u002Fdocstring or that command's `--help` in one lookup, then use the actual\nreader\u002Fvalidator. Inspect implementation for a reproducible contradiction or\npackage bug. Invalid input is a reportable blocker, not an API-discovery task.\nAll tools remain available for a justified investigation; preserve rejection.\nPython imports `zalos_sheetops`; CLI: `sheetops`.\n\n## Complete tables: read → profile → report\n\n```python\nimport json\nfrom pathlib import Path\nfrom zalos_sheetops.io.read_table import read_table\nfrom zalos_sheetops.io.read_csv_table import read_csv_table\nfrom zalos_sheetops.io.read_csv_profile import read_csv_profile\nfrom zalos_sheetops.validation.table_profile import profile_table\nfrom zalos_sheetops.errors import SheetOpsError\n\ntry:\n    # Choose one reader; None reads the entire population.\n    table, receipt = read_csv_profile(Path(\"source.csv\"), key_columns=[\"reference\"],\n        amount_columns=[\"amount\"], encoding=\"auto\", delimiter=\",\")\n    # XLSX alternative: read_table(..., max_rows=None), then profile_table(...).\n    # Adapt fields\u002Fshape to the requested report.\n    result = {\"row_count\": receipt[\"rowCount\"], \"totals\": receipt[\"totals\"]}\nexcept SheetOpsError as error:\n    # Adapt this blocker to the user's requested JSON shape in this same run.\n    result = {\"status\": \"blocked\", \"errorCode\": error.error_code, \"details\": error.details}\nPath(\"result.json\").write_text(json.dumps(result, ensure_ascii=False), encoding=\"utf-8\")\nprint(json.dumps(result, ensure_ascii=False))\n```\n\nReaders return `headers` (stripped, lowercased, whitespace collapsed), `rows`, `rowCount`, `returnedRowCount`,\n`truncated`. XLSX rows are string lists; CSV rows are dictionaries (CSV also adds\n`sourceRows`, `encoding`, `delimiter`). Preserve IDs, amounts, whitespace and\nmultiline values. Use returned header names (e.g. `reference`, not `Reference`)\nin key\u002Famount lists. Resolve a missing column from the loaded `table[\"headers\"]`.\nLegacy encodings need an explicit codec; specify CSV delimiters.\n\n`profile_table` checks the complete population, counts, rectangular rows,\nnonblank text keys and finite bounded decimal-string amounts. It returns\n`validated`, `rowCount`, exact `totals[column]`, and `columns[column]` containing\n`first`\u002F`last` (source order), `min`\u002F`max` (lexical), `blankCount`.\nUse the requested statistic and loaded rows for other fields. Previews\n(`maxRows` CLI \u002F `max_rows` Python) cannot validate totals.\n\n**Report a rejection from its receipt.** `table_width_mismatch` detects populated\nunheaded cells, including zero; `details[\"sheet\"]` and `details[\"row\"]` locate the\nfirst offending source row. `invalid_table_values` gives `invalidRecordCount`,\n`issueCount`, up to 20 `issues` with record\u002Fsource-row locations, `issuesTruncated`.\nEach issue includes `valueType`; strings add the original `valuePreview` (up to\n80 characters) and `valueTruncated`. These are bounded examples; invalid-record\ncounts still cover the entire population. Use this evidence and the loaded rows\nto explain the rejection; investigate another source read only for a concrete gap\nor conflicting evidence.\nProfile every whole source and collect all invalid-record counts before matching\nor filtering. Investigate conflicting evidence or additional required controls;\na documented rejection alone needs no source-code audit. Never discard bad rows.\nCLI: `ok: true, data` or `ok: false, errorCode, message, details` with nonzero exit.\n\nFor CSV source validation, `read_csv_profile(path, *, key_columns, amount_columns,\nencoding=\"auto\", delimiter=\",\", header_row=1)` returns `(complete_table, receipt)`.\nIt reuses the same complete-population\u002Fvalue checks, rejects row limits, and adds\n`receipt.source`: actual path, SHA-256, headers, encoding, delimiter and row count.\nRejections preserve their codes\u002Fcounts and include `details.sourceExcerpts` read\nindependently from original CSV text (up to 3 physical lines \u002F 240 characters per\nretained source row, with truncation flags). A changed source blocks the receipt.\nUse this source evidence in the read\u002Fvalidate\u002Freport program; resolve additional\nreads only for a concrete gap or conflicting evidence.\n\n## Dates and bounded cell evidence\n\nFor dates, add `value_mode=\"typed\"` to `read_table`: workbook epoch (1900\u002F1904)\nand date styles are applied; IDs\u002Famounts retain source strings. Date cells become\ndatetime strings. With `from datetime import datetime`, a requested date-only\nfield is `datetime.fromisoformat(value).date().isoformat()`; otherwise keep time.\nRaw mode returns serials; typed mode already resolves the epoch.\nTyped XML table\u002Fcell receipts include `valueMode: \"typed\"` and `dateSystem:\n\"1900\" | \"1904\"`. These identify the applied conversion; combine them with the\nreturned values\u002Fformats for date evidence. Investigate only a concrete conflict,\nrather than opening workbook XML to redo a successful conversion.\n\n\nFor known coordinates, use this Python API in the same kernel as validation and\nreporting. It returns the data dictionary directly (no CLI `ok`\u002F`data` envelope):\n\n```python\nimport hashlib\nimport json\nfrom datetime import datetime, timedelta\nfrom decimal import Decimal\nfrom pathlib import Path\nfrom openpyxl.styles.numbers import is_date_format\nfrom openpyxl.utils.cell import get_column_letter, range_boundaries\nfrom zalos_sheetops.io.read_cells import read_cells\n\n# Bind actual sheet\u002Frange, column order, header labels and requested record count.\nsource, sheet, bounds = Path(\"source.xlsx\"), \"Data\", \"A1:C7\"\nexpected_headers = [\"reference\", \"amount\", \"date\"]\nexpected_records = 3  # supplied business expectation; otherwise use actual population\nbefore = hashlib.sha256(source.read_bytes()).hexdigest()\ndata = read_cells(source, sheet, bounds, engine=\"xml\",\n                  value_mode=\"typed\", include=[\"values\", \"sourceValues\", \"formulas\",\n                                                \"cachedValues\", \"numberFormats\", \"dataTypes\"])\nmin_col, top, max_col, bottom = range_boundaries(bounds)\ncolumns = [get_column_letter(col) for col in range(min_col, max_col + 1)]\ncells = {cell[\"address\"]: cell for cell in data[\"cells\"]}\nassert len(cells) == data[\"returnedCellCount\"] == len(data[\"cells\"])\nassert data[\"rowCount\"] == bottom - top + 1 and data[\"columnCount\"] == len(columns)\nassert data[\"cellCount\"] == data[\"rowCount\"] * data[\"columnCount\"]  # includes all blanks\nassert set(cells) \u003C= {f\"{col}{row}\" for row in range(top, bottom + 1) for col in columns}\nassert data[\"dateSystem\"] in {\"1900\", \"1904\"}\nassert [cells[f\"{col}{top}\"][\"value\"] for col in columns] == expected_headers\nrecords, empty_rows = [], []\nfor row in range(top + 1, bottom + 1):\n    addresses = [f\"{col}{row}\" for col in columns]\n    if all(address not in cells for address in addresses):\n        empty_rows.append(row)\n        continue\n    assert all(address in cells and \"formula\" not in cells[address] for address in addresses)\n    reference_cell, amount_cell, date_cell = [cells[address] for address in addresses]  # adapt order\n    reference, amount = reference_cell[\"sourceValue\"], amount_cell[\"sourceValue\"]\n    assert isinstance(reference, str) and reference.strip()\n    assert isinstance(amount, str) and Decimal(amount).is_finite()\n    parsed = datetime.fromisoformat(date_cell[\"value\"])\n    assert date_cell[\"dataType\"] == \"n\" and is_date_format(date_cell[\"numberFormat\"])\n    # Independent calendar-day control from the original serial, no float conversion.\n    serial = Decimal(date_cell[\"sourceValue\"])\n    assert serial.is_finite() and serial >= 1\n    days = int(serial)\n    epoch = datetime(1904, 1, 1) if data[\"dateSystem\"] == \"1904\" else datetime(1899, 12, 30)\n    if data[\"dateSystem\"] == \"1900\" and days \u003C 60:\n        days += 1  # Excel's fictitious 1900 leap day\n    assert parsed.date() == (epoch + timedelta(days=days)).date()\n    records.append({\"reference\": reference, \"amount\": amount, \"date\": parsed.date().isoformat()})\nassert len(records) == expected_records\nassert 1 + len(records) + len(empty_rows) == data[\"rowCount\"]\nassert hashlib.sha256(source.read_bytes()).hexdigest() == before\nresult = {\"records\": records}  # adapt requested fields; retain datetime if requested\noutput = Path(\"result.json\")\noutput.write_text(json.dumps(result, ensure_ascii=False, allow_nan=False), encoding=\"utf-8\")\nassert json.loads(output.read_text(encoding=\"utf-8\")) == result\nprint(json.dumps({\"dateSystem\": data[\"dateSystem\"], \"result\": result}))\n```\n\nUse the include names above. `sourceValue` retains original numeric XML strings\n(including every digit) or decoded text; `value` supplies typed ISO dates.\nThe receipt's `dateSystem` and number formats establish date interpretation;\nuse this evidence directly. Formula `sourceValue` is a saved cache, not a fresh\ncalculation. This evidence comes from the same reader; independent business\ncontrols still compare actual source populations or expected business results.\n`rowCount`\u002F`columnCount` span the full requested grid, including headers and blank\nrows. `cellCount = rowCount * columnCount`; `returnedCellCount = len(cells)` counts\npopulated cells (headers, zero, False and formulas included). Neither is a record\ncount: a 7×3 range is 21 cells; its header plus three complete data rows returns 12.\nIterate all physical rows, skip only wholly blank rows and reject partial rows.\nAccount for headers + records + empty rows; no regex or date-parser reconstruction\nis needed. The example checks calendar dates; preserve and check time separately\nwhen requested. For ISO date cells (`dataType=\"d\"`), compare source\u002Ftyped ISO dates\ninstead of numeric serial arithmetic. Reads are bounded to 10,000 cells. Typed mode uses\nstyles\u002Fworkbook epoch and emits ISO strings; convert ISO datetime to the requested\ndate shape. Raw mode retains serials; table reads default to raw, so explicitly\nselect `value_mode=\"typed\"` for dates. A bare number alone is not date evidence.\nUse `sourceValue` for exact numeric amounts rather than converting `value` through\nfloat. The XML\u002Fauto engines support `sourceValues`; openpyxl rejects that option.\n\nFormula text and saved cached results are separate; caches may be stale or absent.\nResolve required missing cells\u002Fcaches. Recalculation requires an engine, not a\ncache read. Include source sheet\u002Frow only where the requested schema permits.\nKeep exact output schemas unchanged. For unknown coordinates use one bounded\npreview; for read-only reports the recipes here supply the workflow.\n\n\nCLI equivalent: `sheetops cells read --json` with path, sheet, range, engine,\nvalueMode and `\"include\"` fields. For unknown structure use a bounded inspection:\n`sheetops inspect --json '{\"path\":\"source.xlsx\",\"maxFormulaCells\":10}'`.\n\n## Financial CSV controls\n\nFor CSV transaction matching, use the public complete workflow in the analysis\nprogram; it profiles both sources before matching and independently verifies\nclassification, exact differences, unique assignments and both-side coverage:\n\n```python\nfrom pathlib import Path\nfrom zalos_sheetops.finance import reconcile_csv\nanalysis = reconcile_csv(Path(\"left.csv\"), Path(\"right.csv\"),\n    left_key_columns=[\"reference\"], right_key_columns=[\"posting reference\"],\n    left_amount_column=\"amount\", right_amount_column=\"net amount\",\n    amount_tolerance=\"0\", left_encoding=\"auto\", right_encoding=\"auto\",\n    left_delimiter=\",\", right_delimiter=\",\")\nif analysis[\"status\"] == \"blocked\":\n    result = {\"status\": \"blocked\", \"invalid_rows\": analysis[\"invalidRecordCount\"]}\nelse:\n    result = {\"summary\": analysis[\"report\"][\"summary\"]}  # adapt requested fields\n```\n\nFor grouped source\u002Fper-line-rounded totals, import `check_grouped_totals_csv`\nfrom the same module. Its keyword arguments are `group_column`, `side_column`,\n`amount_column`, `decimal_places` (the full group→integer precision mapping),\n`left_label`, `right_label`, `rounding=\"half_up\"`, `source_tolerance=\"0\"`,\n`encoding=\"auto\"`, `delimiter=\",\"`. It checks every record and group assignment,\nthen independently verifies source and sums-of-rounded-lines totals. Unknown\nside\u002Fgroup values fail; no record is filtered away. `half_even` is also supported.\n`report.groups` is sorted by `group`; entries contain the `check_totals` report\nplus the source group string. Preserve both differences and every false match flag.\n\nBoth workflows return `status` (`checked` or `blocked`), `report`, `sources`,\n`rejections`, `invalidRecordCount` and `checks`. Sources are named `left`\u002F`right`\nfor reconciliation and `source` for totals. Each has `path`, `rowCount`,\n`invalidRecordCount`, `sha256Before`, `sha256After`, `headers`, `encoding`,\n`delimiter`, `headerRow`. Rejections retain complete counts and bounded original\nsource excerpts; blocked `report` is None. A checked reconciliation report has\n`summary` plus `matched`, `variance`, `leftUnmatched`, `rightUnmatched` lists.\nRight-unmatched keys use right column names; other keys use left names.\n\nKeep full reports in Python; map only the requested result schema, save\u002Fparse it\nin the same execution and bind its hash and source counts\u002Fhashes in the requested\nevidence receipt. Add independent external business expectations. Mechanical\nchecked status is not financial balance, formula evaluation or posting approval.\nExpected input rejection needs no source\u002FAPI discovery or unchecked fallback.\nFor an unavailable workflow import, use the equivalent lower-level recipe in\n[finance-python-legacy.md](references\u002Ffinance-python-legacy.md) or report setup\nunavailable; preserve all checks. XLSX inputs retain complete table reads and\nmust use equivalent lower-level controls.\n\n- For Arrow\u002Ffastexcel values-only bulk reads, read [bulk.md](references\u002Fbulk.md).\n- For editing, styles, normalization, diff or formula delivery, read\n  [workbook-operations.md](references\u002Fworkbook-operations.md). Preserve unrelated\n  cells; formula delivery requires actual successful engine evaluation.\n- Before changing or benchmarking operations, read [development.md](references\u002Fdevelopment.md).\n\n- For CLI-only complete-table profiling, read [cli-profile.md](references\u002Fcli-profile.md).\n","# SheetOps\n\n## Data-analysis workflow\n\nUse the documented Python APIs below directly on the supplied files. This task\nuses an installed spreadsheet library; a successful import in the analysis\nscript checks availability. The validated read supplies the data evidence.\n\n1. Start the analysis script with the documented imports and the actual reader.\n   Use given paths, sheets, header rows, encodings and delimiters. Inspect once\n   only when a required source coordinate is unknown.\n2. Validate each entire required population, then compute the requested controls\n   on the loaded rows. Reuse the receipts and rows for all report fields.\n3. Construct and save the requested JSON in that same execution, including its\n   requested blocked shape when a control rejects. Print compact findings.\n\nFinish when the requested report is saved and every applicable control has\npassed or its blocker is reported. A successful import plus these receipts\ncompletes availability\u002Fdata checks. Extra package browsing or manual parser\nreimplementation adds no control. Use a heredoc or a writable working directory.\n\nFor an unexpected API\u002Fimport error, resolve the specific gap with the callable's\nsignature\u002Fdocstring or that command's `--help` in one lookup, then use the actual\nreader\u002Fvalidator. Inspect implementation for a reproducible contradiction or\npackage bug. Invalid input is a reportable blocker, not an API-discovery task.\nAll tools remain available for a justified investigation; preserve rejection.\nPython imports `zalos_sheetops`; CLI: `sheetops`.\n\n## Complete tables: read → profile → report\n\n```python\nimport json\nfrom pathlib import Path\nfrom zalos_sheetops.io.read_table import read_table\nfrom zalos_sheetops.io.read_csv_table import read_csv_table\nfrom zalos_sheetops.io.read_csv_profile import read_csv_profile\nfrom zalos_sheetops.validation.table_profile import profile_table\nfrom zalos_sheetops.errors import SheetOpsError\n\ntry:\n    # Choose one reader; None reads the entire population.\n    table, receipt = read_csv_profile(Path(\"source.csv\"), key_columns=[\"reference\"],\n        amount_columns=[\"amount\"], encoding=\"auto\", delimiter=\",\")\n    # XLSX alternative: read_table(..., max_rows=None), then profile_table(...).\n    # Adapt fields\u002Fshape to the requested report.\n    result = {\"row_count\": receipt[\"rowCount\"], \"totals\": receipt[\"totals\"]}\nexcept SheetOpsError as error:\n    # Adapt this blocker to the user's requested JSON shape in this same run.\n    result = {\"status\": \"blocked\", \"errorCode\": error.error_code, \"details\": error.details}\nPath(\"result.json\").write_text(json.dumps(result, ensure_ascii=False), encoding=\"utf-8\")\nprint(json.dumps(result, ensure_ascii=False))\n```\n\nReaders return `headers` (stripped, lowercased, whitespace collapsed), `rows`, `rowCount`, `returnedRowCount`,\n`truncated`. XLSX rows are string lists; CSV rows are dictionaries (CSV also adds\n`sourceRows`, `encoding`, `delimiter`). Preserve IDs, amounts, whitespace and\nmultiline values. Use returned header names (e.g. `reference`, not `Reference`)\nin key\u002Famount lists. Resolve a missing column from the loaded `table[\"headers\"]`.\nLegacy encodings need an explicit codec; specify CSV delimiters.\n\n`profile_table` checks the complete population, counts, rectangular rows,\nnonblank text keys and finite bounded decimal-string amounts. It returns\n`validated`, `rowCount`, exact `totals[column]`, and `columns[column]` containing\n`first`\u002F`last` (source order), `min`\u002F`max` (lexical), `blankCount`.\nUse the requested statistic and loaded rows for other fields. Previews\n(`maxRows` CLI \u002F `max_rows` Python) cannot validate totals.\n\n**Report a rejection from its receipt.** `table_width_mismatch` detects populated\nunheaded cells, including zero; `details[\"sheet\"]` and `details[\"row\"]` locate the\nfirst offending source row. `invalid_table_values` gives `invalidRecordCount`,\n`issueCount`, up to 20 `issues` with record\u002Fsource-row locations, `issuesTruncated`.\nEach issue includes `valueType`; strings add the original `valuePreview` (up to\n80 characters) and `valueTruncated`. These are bounded examples; invalid-record\ncounts still cover the entire population. Use this evidence and the loaded rows\nto explain the rejection; investigate another source read only for a concrete gap\nor conflicting evidence.\nProfile every whole source and collect all invalid-record counts before matching\nor filtering. Investigate conflicting evidence or additional required controls;\na documented rejection alone needs no source-code audit. Never discard bad rows.\nCLI: `ok: true, data` or `ok: false, errorCode, message, details` with nonzero exit.\n\nFor CSV source validation, `read_csv_profile(path, *, key_columns, amount_columns,\nencoding=\"auto\", delimiter=\",\", header_row=1)` returns `(complete_table, receipt)`.\nIt reuses the same complete-population\u002Fvalue checks, rejects row limits, and adds\n`receipt.source`: actual path, SHA-256, headers, encoding, delimiter and row count.\nRejections preserve their codes\u002Fcounts and include `details.sourceExcerpts` read\nindependently from original CSV text (up to 3 physical lines \u002F 240 characters per\nretained source row, with truncation flags). A changed source blocks the receipt.\nUse this source evidence in the read\u002Fvalidate\u002Freport program; resolve additional\nreads only for a concrete gap or conflicting evidence.\n\n## Dates and bounded cell evidence\n\nFor dates, add `value_mode=\"typed\"` to `read_table`: workbook epoch (1900\u002F1904)\nand date styles are applied; IDs\u002Famounts retain source strings. Date cells become\ndatetime strings. With `from datetime import datetime`, a requested date-only\nfield is `datetime.fromisoformat(value).date().isoformat()`; otherwise keep time.\nRaw mode returns serials; typed mode already resolves the epoch.\nTyped XML table\u002Fcell receipts include `valueMode: \"typed\"` and `dateSystem:\n\"1900\" | \"1904\"`. These identify the applied conversion; combine them with the\nreturned values\u002Fformats for date evidence. Investigate only a concrete conflict,\nrather than opening workbook XML to redo a successful conversion.\n\n\nFor known coordinates, use this Python API in the same kernel as validation and\nreporting. It returns the data dictionary directly (no CLI `ok`\u002F`data` envelope):\n\n```python\nimport hashlib\nimport json\nfrom datetime import datetime, timedelta\nfrom decimal import Decimal\nfrom pathlib import Path\nfrom openpyxl.styles.numbers import is_date_format\nfrom openpyxl.utils.cell import get_column_letter, range_boundaries\nfrom zalos_sheetops.io.read_cells import read_cells\n\n# Bind actual sheet\u002Frange, column order, header labels and requested record count.\nsource, sheet, bounds = Path(\"source.xlsx\"), \"Data\", \"A1:C7\"\nexpected_headers = [\"reference\", \"amount\", \"date\"]\nexpected_records = 3  # supplied business expectation; otherwise use actual population\nbefore = hashlib.sha256(source.read_bytes()).hexdigest()\ndata = read_cells(source, sheet, bounds, engine=\"xml\",\n                  value_mode=\"typed\", include=[\"values\", \"sourceValues\", \"formulas\",\n                                                \"cachedValues\", \"numberFormats\", \"dataTypes\"])\nmin_col, top, max_col, bottom = range_boundaries(bounds)\ncolumns = [get_column_letter(col) for col in range(min_col, max_col + 1)]\ncells = {cell[\"address\"]: cell for cell in data[\"cells\"]}\nassert len(cells) == data[\"returnedCellCount\"] == len(data[\"cells\"])\nassert data[\"rowCount\"] == bottom - top + 1 and data[\"columnCount\"] == len(columns)\nassert data[\"cellCount\"] == data[\"rowCount\"] * data[\"columnCount\"]  # includes all blanks\nassert set(cells) \u003C= {f\"{col}{row}\" for row in range(top, bottom + 1) for col in columns}\nassert data[\"dateSystem\"] in {\"1900\", \"1904\"}\nassert [cells[f\"{col}{top}\"][\"value\"] for col in columns] == expected_headers\nrecords, empty_rows = [], []\nfor row in range(top + 1, bottom + 1):\n    addresses = [f\"{col}{row}\" for col in columns]\n    if all(address not in cells for address in addresses):\n        empty_rows.append(row)\n        continue\n    assert all(address in cells and \"formula\" not in cells[address] for address in addresses)\n    reference_cell, amount_cell, date_cell = [cells[address] for address in addresses]  # adapt order\n    reference, amount = reference_cell[\"sourceValue\"], amount_cell[\"sourceValue\"]\n    assert isinstance(reference, str) and reference.strip()\n    assert isinstance(amount, str) and Decimal(amount).is_finite()\n    parsed = datetime.fromisoformat(date_cell[\"value\"])\n    assert date_cell[\"dataType\"] == \"n\" and is_date_format(date_cell[\"numberFormat\"])\n    # Independent calendar-day control from the original serial, no float conversion.\n    serial = Decimal(date_cell[\"sourceValue\"])\n    assert serial.is_finite() and serial >= 1\n    days = int(serial)\n    epoch = datetime(1904, 1, 1) if data[\"dateSystem\"] == \"1904\" else datetime(1899, 12, 30)\n    if data[\"dateSystem\"] == \"1900\" and days \u003C 60:\n        days += 1  # Excel's fictitious 1900 leap day\n    assert parsed.date() == (epoch + timedelta(days=days)).date()\n    records.append({\"reference\": reference, \"amount\": amount, \"date\": parsed.date().isoformat()})\nassert len(records) == expected_records\nassert 1 + len(records) + len(empty_rows) == data[\"rowCount\"]\nassert hashlib.sha256(source.read_bytes()).hexdigest() == before\nresult = {\"records\": records}  # adapt requested fields; retain datetime if requested\noutput = Path(\"result.json\")\noutput.write_text(json.dumps(result, ensure_ascii=False, allow_nan=False), encoding=\"utf-8\")\nassert json.loads(output.read_text(encoding=\"utf-8\")) == result\nprint(json.dumps({\"dateSystem\": data[\"dateSystem\"], \"result\": result}))\n```\n\nUse the include names above. `sourceValue` retains original numeric XML strings\n(including every digit) or decoded text; `value` supplies typed ISO dates.\nThe receipt's `dateSystem` and number formats establish date interpretation;\nuse this evidence directly. Formula `sourceValue` is a saved cache, not a fresh\ncalculation. This evidence comes from the same reader; independent business\ncontrols still compare actual source populations or expected business results.\n`rowCount`\u002F`columnCount` span the full requested grid, including headers and blank\nrows. `cellCount = rowCount * columnCount`; `returnedCellCount = len(cells)` counts\npopulated cells (headers, zero, False and formulas included). Neither is a record\ncount: a 7×3 range is 21 cells; its header plus three complete data rows returns 12.\nIterate all physical rows, skip only wholly blank rows and reject partial rows.\nAccount for headers + records + empty rows; no regex or date-parser reconstruction\nis needed. The example checks calendar dates; preserve and check time separately\nwhen requested. For ISO date cells (`dataType=\"d\"`), compare source\u002Ftyped ISO dates\ninstead of numeric serial arithmetic. Reads are bounded to 10,000 cells. Typed mode uses\nstyles\u002Fworkbook epoch and emits ISO strings; convert ISO datetime to the requested\ndate shape. Raw mode retains serials; table reads default to raw, so explicitly\nselect `value_mode=\"typed\"` for dates. A bare number alone is not date evidence.\nUse `sourceValue` for exact numeric amounts rather than converting `value` through\nfloat. The XML\u002Fauto engines support `sourceValues`; openpyxl rejects that option.\n\nFormula text and saved cached results are separate; caches may be stale or absent.\nResolve required missing cells\u002Fcaches. Recalculation requires an engine, not a\ncache read. Include source sheet\u002Frow only where the requested schema permits.\nKeep exact output schemas unchanged. For unknown coordinates use one bounded\npreview; for read-only reports the recipes here supply the workflow.\n\n\nCLI equivalent: `sheetops cells read --json` with path, sheet, range, engine,\nvalueMode and `\"include\"` fields. For unknown structure use a bounded inspection:\n`sheetops inspect --json '{\"path\":\"source.xlsx\",\"maxFormulaCells\":10}'`.\n\n## Financial CSV controls\n\nFor CSV transaction matching, use the public complete workflow in the analysis\nprogram; it profiles both sources before matching and independently verifies\nclassification, exact differences, unique assignments and both-side coverage:\n\n```python\nfrom pathlib import Path\nfrom zalos_sheetops.finance import reconcile_csv\nanalysis = reconcile_csv(Path(\"left.csv\"), Path(\"right.csv\"),\n    left_key_columns=[\"reference\"], right_key_columns=[\"posting reference\"],\n    left_amount_column=\"amount\", right_amount_column=\"net amount\",\n    amount_tolerance=\"0\", left_encoding=\"auto\", right_encoding=\"auto\",\n    left_delimiter=\",\", right_delimiter=\",\")\nif analysis[\"status\"] == \"blocked\":\n    result = {\"status\": \"blocked\", \"invalid_rows\": analysis[\"invalidRecordCount\"]}\nelse:\n    result = {\"summary\": analysis[\"report\"][\"summary\"]}  # adapt requested fields\n```\n\nFor grouped source\u002Fper-line-rounded totals, import `check_grouped_totals_csv`\nfrom the same module. Its keyword arguments are `group_column`, `side_column`,\n`amount_column`, `decimal_places` (the full group→integer precision mapping),\n`left_label`, `right_label`, `rounding=\"half_up\"`, `source_tolerance=\"0\"`,\n`encoding=\"auto\"`, `delimiter=\",\"`. It checks every record and group assignment,\nthen independently verifies source and sums-of-rounded-lines totals. Unknown\nside\u002Fgroup values fail; no record is filtered away. `half_even` is also supported.\n`report.groups` is sorted by `group`; entries contain the `check_totals` report\nplus the source group string. Preserve both differences and every false match flag.\n\nBoth workflows return `status` (`checked` or `blocked`), `report`, `sources`,\n`rejections`, `invalidRecordCount` and `checks`. Sources are named `left`\u002F`right`\nfor reconciliation and `source` for totals. Each has `path`, `rowCount`,\n`invalidRecordCount`, `sha256Before`, `sha256After`, `headers`, `encoding`,\n`delimiter`, `headerRow`. Rejections retain complete counts and bounded original\nsource excerpts; blocked `report` is None. A checked reconciliation report has\n`summary` plus `matched`, `variance`, `leftUnmatched`, `rightUnmatched` lists.\nRight-unmatched keys use right column names; other keys use left names.\n\nKeep full reports in Python; map only the requested result schema, save\u002Fparse it\nin the same execution and bind its hash and source counts\u002Fhashes in the requested\nevidence receipt. Add independent external business expectations. Mechanical\nchecked status is not financial balance, formula evaluation or posting approval.\nExpected input rejection needs no source\u002FAPI discovery or unchecked fallback.\nFor an unavailable workflow import, use the equivalent lower-level recipe in\n[finance-python-legacy.md](references\u002Ffinance-python-legacy.md) or report setup\nunavailable; preserve all checks. XLSX inputs retain complete table reads and\nmust use equivalent lower-level controls.\n\n- For Arrow\u002Ffastexcel values-only bulk reads, read [bulk.md](references\u002Fbulk.md).\n- For editing, styles, normalization, diff or formula delivery, read\n  [workbook-operations.md](references\u002Fworkbook-operations.md). Preserve unrelated\n  cells; formula delivery requires actual successful engine evaluation.\n- Before changing or benchmarking operations, read [development.md](references\u002Fdevelopment.md).\n\n- For CLI-only complete-table profiling, read [cli-profile.md](references\u002Fcli-profile.md).\n",{"name":5,"description":7},"main","d7634c41c10626fffed7c04411e3f04c7987748b","skills\u002Fcodex","https:\u002F\u002Fgithub.com\u002FZalos-io\u002Fzalos-sheetops","https:\u002F\u002Fgithub.com\u002FZalos-io","zalos.ai","2026-10-21 04:10:22",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add Zalos-io\u002Fzalos-sheetops --skill sheetops",{"tool":37,"command":38},"bunx","bunx skills add Zalos-io\u002Fzalos-sheetops --skill sheetops",{"tool":40,"command":41},"pnpm","pnpm dlx skills add Zalos-io\u002Fzalos-sheetops --skill sheetops","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZalos-io\u002Fzalos-sheetops\u002Fblob\u002Fmain\u002Fskills\u002Fcodex\u002FSKILL.md",true,[45,51,55,59,63],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fbulk.md","REFERENCE","参考文档",1291,"https:\u002F\u002Fgithub.com\u002FZalos-io\u002Fzalos-sheetops\u002Fblob\u002Fmain\u002Fskills\u002Fcodex\u002Freferences\u002Fbulk.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fcli-profile.md",1866,"https:\u002F\u002Fgithub.com\u002FZalos-io\u002Fzalos-sheetops\u002Fblob\u002Fmain\u002Fskills\u002Fcodex\u002Freferences\u002Fcli-profile.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fdevelopment.md",1171,"https:\u002F\u002Fgithub.com\u002FZalos-io\u002Fzalos-sheetops\u002Fblob\u002Fmain\u002Fskills\u002Fcodex\u002Freferences\u002Fdevelopment.md",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Ffinance-python-legacy.md",5269,"https:\u002F\u002Fgithub.com\u002FZalos-io\u002Fzalos-sheetops\u002Fblob\u002Fmain\u002Fskills\u002Fcodex\u002Freferences\u002Ffinance-python-legacy.md",{"path":64,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fworkbook-operations.md",2595,"https:\u002F\u002Fgithub.com\u002FZalos-io\u002Fzalos-sheetops\u002Fblob\u002Fmain\u002Fskills\u002Fcodex\u002Freferences\u002Fworkbook-operations.md",[68],{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7EEZYVPFR26D8T69RFMVPFD","claude","https:\u002F\u002Fgithub.com\u002FZalos-io\u002Fzalos-sheetops\u002Fblob\u002Fmain\u002Fskills\u002Fclaude\u002FSKILL.md",[],[]]