Skip to content

Handle exclamation marks in quoted sheet titles when extracting A1 ranges - #1606

Open
FanWu-ai wants to merge 1 commit into
burnash:masterfrom
FanWu-ai:fix/quoted-sheet-range-20261006
Open

FanWu-ai wants to merge 1 commit into
burnash:masterfrom
FanWu-ai:fix/quoted-sheet-range-20261006

Conversation

@FanWu-ai

@FanWu-ai FanWu-ai commented Oct 6, 2026

Copy link
Copy Markdown

The public get_a1_from_absolute_range helper splits an absolute range at the first exclamation mark. Valid quoted sheet titles containing that character therefore return part of the title instead of the A1 range. For example, get_a1_from_absolute_range("'Important! Sheet'!A1:B2") returns " Sheet'".

Split once from the right so the final sheet/range separator is used. Regression coverage round-trips absolute_range_name for single/multiple exclamation marks, escaped apostrophes, a title containing only !, bounded and open ranges, and row-only ranges.

Validation: complete upstream offline suite: 167 passed (no skips or deselections). Black 24.8.0 checked all 18 files discovered by Black itself individually because the container denies the multiprocess manager socket; unchanged source/configuration and identical file coverage. codespell, flake8, isort, pinned mypy 1.11.2, Bandit, source/wheel build, Sphinx -W, pyupgrade, and git diff --check passed.

Local validation used CPython 3.11.16/Linux. The upstream interpreter/platform CI matrix has not been run locally. The advisory pip-audit step did not run successfully; it is configured as non-blocking in CI and is not counted as passed.

Prepared with OpenAI Codex assistance.

@FanWu-ai
FanWu-ai marked this pull request as ready for review October 6, 2026 04:35

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant