Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retitling Cloned Worksheets #4302

Merged
merged 4 commits into from
Jan 8, 2025
Merged

Retitling Cloned Worksheets #4302

merged 4 commits into from
Jan 8, 2025

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:

  • 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

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
13 of 14 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