Repository navigation
Add named Excel table read and write connector - #1222
Open
mborodii-prog wants to merge 3 commits into
Open
mborodii-prog wants to merge 3 commits into
mborodii-prog wants to merge 3 commits into
Conversation
mborodii-prog
marked this pull request as ready for review
October 9, 2026 11:01
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Non-finite dataframe values can still produce invalid strict-JSON table payloads.
1 open finding
What changed in this PR
Adds named Excel table read/write support through WranglesXL’s existing variable and memory transports.
Changes:
- Implements table snapshots, writes, validation, batching, and schema definitions.
- Adds comprehensive connector tests and integration documentation.
- Exposes the new documentation from the README.
Recommended disposition: Request changes
Next steps
- PR assignee: Define handling for infinite values, update the connector and regression tests, then run the focused local suite.
- AI agent:
@codex address the non-finite JSON feedback, add ±infinity regression tests, and report the checks run - Reviewer: Verify the fix, resolve the thread, and re-review after companion/live integration gates pass.
| File | Description |
|---|---|
wrangles/connectors/excel.py |
Implements the named-table connector and validation. |
tests/connectors/test_excel.py |
Tests reads, writes, schemas, batching, and destinations. |
README.md |
Links the table documentation. |
docs/excel-tables.md |
Documents behavior and integration requirements. |
.gitignore |
Allows the new documentation file. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| action = "append" | ||
| # A composed read may introduce NaN/pd.NA/NaT. Emit valid JSON cells | ||
| # without changing the dataframe returned to the recipe caller. | ||
| output = df.astype(object).where(_pd.notna(df), None) |
7 of 35 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Implements the Python portion of #1220; keep this PR draft until companion integration and live Excel verification pass.
Behavior
Add
read: excel.tableandwrite: excel.tablefor workbook-wide named tables. Reads require existing tables; writes can create missing destinations. WranglesXL supplies immutable__excel_tablessnapshots through the existing recipe variables; Python reads headers and rows into a dataframe independently of selection. Writes emit orderedexcel.table.writesplit payloads with target name and replace/append action. Replace is the default; later external selection batches append. Empty replacements are retained, and input snapshots never become memory write outputs.Missing read tables error. Missing write tables are created on the configured worksheet and cell; existing workbook-wide tables retain their location. Names are case-insensitive. Headers are nonempty unique strings. XL requires matching existing column names and aligns order, resizes body rows, excludes totals on read, and rejects filtered/formula destinations and incoming formula strings in this first version. Schema is discovered by the existing generator; add user/transport documentation in docs/excel-tables.md.
This does not modify #943, selected-data connectors, saved recipes or deployment workflows. Existing Lambda variables and memory output transport carry the contract without a new top-level API field.
Validation
python -m pytest -c pytest-local.ini tests/connectors/test_excel.py -q: 70 passed, including actual recipe execution, composed sources, immutable input, ordered payloads, batch actions, invalid names/data/actions, empty results and generated schema validation.Relevant offline regression run (excel, input, memory, matrix, recipe read/write): 154 passed using pytest-local.ini with WRANGLES_LOCAL_ONLY=1.
scripts/check_pytest_local_config.py: in sync (isolated Python environment).git diff --check: passed.Sheet/cell creation
write: excel.tableacceptssheetandcell. OmittedcellbecomesA1. Omittedsheetis the first 10 characters of<recipe_name>-<table_name>(fallback recipe nameRecipe); invalid generated worksheet characters become underscores. Explicit worksheet names are preserved.nullin table payloads without modifying the logical dataframe or read snapshots.git diff --checkruns. XL tests reuse the locally installed dependency tree with a scratch configuration and Windows sandbox realpath/TextEncoder setup; this is not a clean dependency-install or live Office test.Integration gates and limitations
Companion WranglesXL: wrangleworks/WranglesXL#1291.
WranglesJS table write-mode implementation is tested locally (16 tests plus targeted TypeScript compile); push denied HTTP 403 and fork denied organization policy. Maintainer write access is required to land the companion change before publishing.
Publish matching Python and generated schema, and validate a clean XL dependency build. No merge, publication or deployment performed.
Run live Excel/development-Lambda tests with synthetic data and recorded component versions, especially totals, filters, empty replacement, resize, surrounding cells, batching and cancellation.
Input snapshots must fit existing request limits; no table-input streaming. Top-level read/compositions only; hidden reads inside saved child recipes cannot dynamically fetch workbook tables.
Table outputs are staged before mutation, but Office writes are not transactional. Formula/filter rejection and unchanged column sets are documented compatibility limits.
Rollback: revert companion routing and connector changes; existing sheet/columns behavior remains available.