-
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
Inserting new row causes some address to return "XFD" instead. #3263
Comments
Confirmed, but this appears to be a bug in Php, not PhpSpreadsheet. I will attempt to open a ticket there. As far as I can tell, the code in question worked through PHP7.3, and became broken in PHP7.4. |
Actually, it is possible that PHP7.4 changed the way that column comparisons happened. I think we can probably fix this in PhpSpreadsheet after all. |
Hmmmm, that looks like my bad; it was a bugfix that targeted ensuring that row/column ranges didn't fall outside the Excel max rows/columns, rather than cell ranges; but looks like I may have introduced a new bug for cell ranges in doing so |
Fix PHPOffice#3263. Code was comparing column string to max column (XFD), but comparison was done by strings so that any column beginning with Y or Z would seem to exceed the max and would be handled incorrectly. Change to compare to maximum integer index of column (16384) instead.
Fix #3263. Code was comparing column string to max column (XFD), but comparison was done by strings so that any column beginning with Y or Z would seem to exceed the max and would be handled incorrectly. Change to compare to maximum integer index of column (16384) instead.
This is:
What is the expected behavior?
Upon calling "insertNewRowBefore", the cell references should be updated correctly.
What is the current behavior?
Currently, after calling "insertNewRowBefore", any columns starting with "Y", and "Z" evaluates to "true" and PhpSpreadsheet sets the new column value to "AddressRange::MAX_COLUMN"
What features do you think are causing the issue
Does an issue affect all spreadsheet file formats? If not, which formats are affected?
So far only XLSX has been tested.
Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet v1.26.0
After some digging, the issue seems to be from
PhpSpreadsheet/src/PhpSpreadsheet/CellReferenceHelper.php
Line 120 in e7a0e80
The text was updated successfully, but these errors were encountered: