-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Sheet does not exist When removing sheet #2266
Comments
Did you mean to specify 'Sheet3' rather than 'Shhet3' in the following statement? $sheetIndex = $spreadsheet->getIndex(
$spreadsheet->getSheetByName('Shhet3')
); Even without this change, I get an Exception, as I should, on the |
Hey there, THanks for the quick answers. I don't understand why you have a an Exception on |
I've tried to take a look at my code : I can see all the sheeths before deleting them. Then if I dump sheet after the removed some, I Can see there is still one. That's why I can't understand why it broke on |
I understand the need to not leak your customer's content, but, since I can't duplicate your symptom, I really need an example of a spreadsheet which is failing in this manner before I can investigate further. |
Hey @oleibman I'm sorry for the delay. I have check with the customer and he is okay to share a file with you. And here the function where i delete Sheets :
Still the error on the save function. |
Thank you for providing the sample. |
Fixes issue PHPOffice#2266. Writer/Xlsx fails when there is no longer a sheet which corresponds to the definition of a local defined name. The code is changed to drop such an orphaned name. Writer/Xls does not fail under the same cicrcumstances, so no correction is needed there. Writer/Ods fails in a different manner, and is corrected to no longer do so.
Thank you for this fast answer. |
Fixes issue #2266. Writer/Xlsx fails when there is no longer a sheet which corresponds to the definition of a local defined name. The code is changed to drop such an orphaned name. Writer/Xls does not fail under the same cicrcumstances, so no correction is needed there. Writer/Ods fails in a different manner, and is corrected to no longer do so.
Hey there. My company need it for a project and we are ready to support project or to buy support (if you have one) to be ready for the project release. |
Fixed in 1.19.0 |
This is:
What is the expected behavior?
When I want to remove sheets from an exsiting file, when saving the following error appear : "Sheet does not exist"
What is the current behavior?
While saving the code stop working and return an error
What are the steps to reproduce?
The code is run inside a Symfony project. I call a PHP file where I can complete my file with data then I want to remove them by using the folowing code
The code stop runnig on saving with no more informations
Which versions of PhpSpreadsheet and PHP are affected?
"phpoffice/phpspreadsheet": "^1.17"
The text was updated successfully, but these errors were encountered: