Summary: | XLSX: the "highest row with data" marker will go to 1048576 when deleting any row within rows with data | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Richard <brotherseven> |
Component: | Calc | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | erack |
Priority: | medium | ||
Version: | 7.3.4.2 release | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Attachments: | Just a simple XLSX created with MS Excel 2016 |
Description
Richard
2022-07-05 04:30:11 UTC
(In reply to Richard from comment #0) > Expected Results: > 1. in MS Excel, pressing [command]-[down arrow] x 2 times should go to the > last row with data No. The first press is expected to bring you to the last row of the current block; the second one should bring you to the end of the next block - or to the last physical spreadsheet row (1048576) if there's no blocks below. The behavior you describe is expected. > 2. should return the last row with data No. getHighestRow is not related to "rows with data" - unlike getHighestDataRow. See e.g. https://github.com/PHPOffice/PhpSpreadsheet/issues/2051 (which is basically the same issue). Deleting rows from a file created in Excel must append new rows to the bottom; the default row heights differ between Excel and Calc -> the appended rows are narrower than the rest, and that *formatting* is reflected in the markup (and is detected by PHPSpreadsheet, and reflected by getHighestRow). Eike: can we read the default row height from the file, or maybe clone formatting from the row above when appending new rows? I think the default row height should simply be set when reading such file if it is available from there (or maybe differs by generator application, but going down that route is also doomed to fail). Created attachment 181131 [details] Just a simple XLSX created with MS Excel 2016 (In reply to Eike Rathke from comment #2) <sheetFormatPr defaultRowHeight="15" x14ac:dyDescent="0.25"/> is present in the attached sample. So this could be turned into "defaultRowHeight attribute of sheetFormatPr is not read / not taken into account when adding rows after row removal". |