3 Commits

Author SHA1 Message Date
oleibman f62034a752 Booleans
I don't know how Excel managed to mess up sorts involving booleans, but they did.
2025-12-10 14:57:02 -08:00
oleibman 9362d21bb5 Additional Test 2025-12-10 11:47:11 -08:00
oleibman 559ab2294a Better Tests for SORT and SORTBY
Current tests use only direct calls. Using them in spreadsheet context would be better.

There were some minor bugs. Excel treats an argument consisting of a single-cell as if it were a range; PhpSpreadsheet, which currently returns the content of the single cell, is changed to match that behavior, which is important if one of the other arguments causes a VALUE error.

Excel can do a column sort in SORTBY, despite the fact that Microsoft doesn't even mention that possibility in its documentation. I found documentation of that possibility on a 3rd-part site https://exceljet.net/functions/sortby-function, confirmed it in Excel, and took my best guess as to how to implement it. The existing test member for SORTBY included one such test, but it succeeds mostly by accident. The new member has a more reliable test.
2025-12-09 23:13:12 -08:00