In the attached *.ods file, cells in column C contain a header (= seqpre) and the digits 1, 2, and 3. I need Calc to sort column C in ascending order. When starting the sort dialog, I have some single cell focused in the area, i.e., I don’t select my data manually – neither A1:CC1883, nor whole columns A:C; I rely on Calc to find the area itself, even though my cells A1882 and A1883 are empty, so the rectangular block is broken. The result is that column C sorts correctly except for the last 2 cells (C:1882 and C:1883). Apparently empty cells in the first column are OK if they occur in the middle but not if they occur in the end, even though the other columns allow to deduce the correct rectangle. Sort Criteria: Sort Key 1: Column [seqpre] (ascending) Sort Key 2: - undefined - Sort Options: Headers: Range contains column labels YES Direction: Top to bottom (sort rows) YES Options: Case sensitive ON Enable natural sort ON
Can't attach the ods file, so I added a link to the Ask site.
Please attach a sample file, reduce the size as much as possible without private information, and paste the information in Menu/Help/About LibreOffice, there is a copy icon. https://ask.libreoffice.org/t/calc-cells-excluded-from-sort/123436
Created attachment 201433 [details] Sample (from AskLibreOffice)
Seems to be solved already: https://ask.libreoffice.org/t/calc-cells-excluded-from-sort/123436
(In reply to Telesto from comment #4) > Seems to be solved already: > https://ask.libreoffice.org/t/calc-cells-excluded-from-sort/123436 The solution in https://ask.libreoffice.org/t/calc-cells-excluded-from-sort/123436/4?u=jeshkhol shows how by choosing Select All the problem can be avoided. For the user who doesn't know this the problem will persist.
Version: 25.2.4.3 (X86_64) / LibreOffice Community Build ID: 33e196637044ead23f5c3226cde09b47731f7e27 CPU threads: 4; OS: macOS 12.7.6; UI render: Skia/Raster; VCL: osx Locale: en-GB (en_GB.UTF-8); UI: en-US Calc: threaded
I think bug 132521 is related, because currently the user has no information inside the sort dialog which cell range is actually determined by the auto-detection. The attached document has a similar problem as bug 132521. It has defined a database range "loc_line" for A1:CC1881. And that one seems to be used by auto-detection. If you modify this database range to cover A1:CC1883, then the two rows with blanks in column A are included. The first step in auto-detection seems to be, to look whether there exists a database range that contains the active cell.