Skip to content

Update Sheetname in Charts When Sheetname Changes - #4984

Open
oleibman wants to merge 1 commit into
PHPOffice:masterfrom
oleibman:issue744
Open

Update Sheetname in Charts When Sheetname Changes#4984
oleibman wants to merge 1 commit into
PHPOffice:masterfrom
oleibman:issue744

Conversation

@oleibman

@oleibman oleibman commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Fix #744 (marked stale in 2019, but now reopened). The fix draws heavily on the work of @guillaume-ro-fr in PR #745, which was closed because of a unit test error which is no longer possible, and because it was targeted to a branch which no longer existed.

Changing a worksheet name can wind up invalidating charts. To fix this: when a worksheet name changes, inspect all the charts in the spreadsheet (the old PR changed only the current worksheet) and change worksheet references from the old name to the new one.

During testing, found and corrected some minor problems with cloning some Chart objects.

This is:

  • a bugfix
  • a new feature
  • refactoring
  • additional unit tests

Checklist:

  • Changes are covered by unit tests
    • Changes are covered by existing unit tests
    • New unit tests have been added
  • Code style is respected
  • Commit message explains why the change is made (see https://github.com/erlang/otp/wiki/Writing-good-commit-messages)
  • CHANGELOG.md contains a short summary of the change and a link to the pull request if applicable
  • Documentation is updated as necessary

Fix PHPOffice#744 (marked stale in 2019, but now reopened). The fix draws heavily on the work of @guillaume-ro-fr in PR PHPOffice#745, which was closed because of a unit test error which is no longer possible, and because it was targeted to a branch which no longer existed.

Changing a worksheet name can wind up invalidating charts. To fix this: when a worksheet name changes, inspect all the charts in the spreadsheet (the old PR changed only the current worksheet) and change worksheet references from the old name to the new one.

During testing, found and corrected some minor problems with cloning some Chart objects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[XLSX] Chart references are not rename with sheet title update

1 participant