-
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
removeRow #2442
Comments
Why wold you expect that behaviour? Like the content, the styling of the cells in a row is removed when those cells are removed; shuffling all subsequent rows up. And this is exactly the behaviour that MS Excel demonstrates when you remove a row. |
I expect that the height of the "new line 4" would be the same as "the old line 5". |
Ah! Now I understand. Yes, that looks like a bug, we should also adjust the row heights (and column widths when removing a column as well). Row height isn't maintained as an aspect of cell style; but as an aspect of the worksheet. |
Fix PHPOffice#2442. Although data and styles are handled correctly after removing row(s) or column(s), the dimensions of the removed rows and columns remain behind to afflict their replacements. This PR will take care of removing the dimensions as well. Dimensions has a _clone method for a deep clone, but all of its properties, as well as the properties of RowDimensions and ColumnDimensions, are scalars, and do not require a deep clone. The method is deleted.
Fix #2442. Although data and styles are handled correctly after removing row(s) or column(s), the dimensions of the removed rows and columns remain behind to afflict their replacements. This PR will take care of removing the dimensions as well. Dimensions has a _clone method for a deep clone, but all of its properties, as well as the properties of RowDimensions and ColumnDimensions, are scalars, and do not require a deep clone. The method is deleted.
This is:
What is the expected behavior?
remove Row and keep style of other cells
What is the current behavior?
remove Row and keep style of removed Row.
Before removeRow
After removeRow (row 4)
What are the steps to reproduce?
Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:
Which versions of PhpSpreadsheet and PHP are affected?
PHP 7.3.21 (cli) (built: Aug 4 2020 11:21:19) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.21, Copyright (c) 1998-2018 Zend Technologies
"name": "phpoffice/phpspreadsheet",
"version": "1.20.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "44436f270bb134b4a94670f3d020a85dfa0a3c02"
The text was updated successfully, but these errors were encountered: