Skip to content

Retitling Cloned Worksheets#4302

Merged
oleibman merged 4 commits intoPHPOffice:masterfrom
oleibman:issue641
Jan 8, 2025
Merged

Retitling Cloned Worksheets#4302
oleibman merged 4 commits intoPHPOffice:masterfrom
oleibman:issue641

Conversation

@oleibman
Copy link
Collaborator

@oleibman oleibman commented Jan 6, 2025

Fix #641 (marked stale in 2018, but now reopened). When a sheet's title is changed, PhpSpreadsheet updates references to the old sheet name found in formulas. Which is a good idea when the sheet is attached to the spreadsheet, but a bad idea when it isn't (often because it has been cloned without re-attaching to the spreadsheet). This PR continues to change formulas in the former case, but will no longer do so for the latter.

This is:

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

Checklist:

Why this change is needed?

Provide an explanation of why this change is needed, with links to any Issues (if appropriate).
If this is a bugfix or a new feature, and there are no existing Issues, then please also create an issue that will make it easier to track progress with this PR.

Fix PHPOffice#641 (marked stale in 2018, but now reopened). When a sheet's title is changed, PhpSpreadsheet updates references to the old sheet name found in formulas. Which is a good idea when the sheet is attached to the spreadsheet, but a bad idea when it isn't (often because it has been cloned without re-attaching to the spreadsheet). This PR continues to change formulas in the former case, but will no longer do so for the latter.
A little more useful than my first crack at this.
oleibman added a commit to oleibman/PhpSpreadsheet that referenced this pull request Jan 7, 2025
oleibman added a commit to oleibman/PhpSpreadsheet that referenced this pull request Jan 7, 2025
oleibman added a commit to oleibman/PhpSpreadsheet that referenced this pull request Jan 7, 2025
@oleibman oleibman enabled auto-merge January 8, 2025 22:31
@oleibman oleibman added this pull request to the merge queue Jan 8, 2025
Merged via the queue into PHPOffice:master with commit f5c285e Jan 8, 2025
12 checks passed
oleibman added a commit that referenced this pull request Jan 8, 2025
* Change hash code for worksheet

Backport of [PR #4207](#4207)

* Retitling Cloned Worksheets

Backport of PR #4302

* Make Test Php7.4 Compatible
oleibman added a commit that referenced this pull request Jan 8, 2025
* Change hash code for worksheet branch release210

Backport of PR #4207

* Retitling Clone Worksheets

Backport of PR #4302.
oleibman added a commit that referenced this pull request Jan 8, 2025
* Change hash code for worksheet branch release210

Backport of PR #4207.

* Retitling Clone Worksheets

Backport of PR #4302.
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.

cell values changed in a cloned ws reflect in the original one also

1 participant