We are seeing what looks like a sorting issue in Aspose.Cells for Node.js via Java 26.1.0.
Environment:
-
aspose.cellsversion:26.1.0 -
Node.js:
20.19.0 -
OS: macOS
Scenario:
-
We load a CSV into a workbook
-
We sort with headers enabled
-
key1isEmployee Idin descending order -
key2isRequest Datein ascending order
Expected behavior:
-
If all rows have the same
Employee Id, Aspose should still apply the secondary sort onRequest Date -
The dates should become ascending within that single employee group
Actual behavior:
-
When all values in
key1are identical, the sort appears to ignorekey2 -
The row order remains unchanged
-
If we instead make
Request Datethe first sort key, sorting works correctly
This suggests that key2 is not being honored when key1 has only one distinct value.
Minimal repro files are below.
Expected Request Date order after sort: 06-Sep-2025, 06-Sep-2025, 06-Sep-2025, 06-Sep-2025, 06-Sep-2025, 06-Sep-2025, 06-Sep-2025, 08-Sep-2025, 14-Sep-2025, 14-Sep-2025, 14-Sep-2025
Actual order we get: 06-Sep-2025, 06-Sep-2025, 06-Sep-2025, 08-Sep-2025, 14-Sep-2025, 14-Sep-2025, 14-Sep-2025, 06-Sep-2025, 06-Sep-2025, 06-Sep-2025, 06-Sep-2025
We also verified that:
-
the sort columns are resolved correctly
-
the secondary date column is populated correctly
-
sorting by
Request Datealone works -
promoting
Request Datetokey1works as a workaround
Can you confirm whether this is a bug or a known limitation in multi-key sorting for CSV-loaded workbooks?
Minimal Repro CSV
Save as repro.csv:
“Employee Id”,“Employee Name”,“Event Type”,“Request Date”,“Form Name”
Ysr_Usreee,“Yanth Ur_10”,“Attendance Request Attestation”,06-Sep-2025,“nw form (Version - 1.0)”
Ysr_Usreee,“Yanth Ur_10”,“Attendance Request Attestation”,06-Sep-2025,“nw form (Version - 1.0)”
Ysr_Usreee,“Yanth Ur_10”,“Attendance Request Attestation”,06-Sep-2025,“nw form (Version - 1.0)”
Ysr_Usreee,“Yanth Ur_10”,“Attendance Request Attestation”,08-Sep-2025,“nw form (Version - 1.0)”
Ysr_Usreee,“Yanth Ur_10”,“Attendance Request Attestation”,14-Sep-2025,“nw form (Version - 1.0)”
Ysr_Usreee,“Yanth Ur_10”,“Attendance Request Attestation”,14-Sep-2025,“nw form (Version - 1.0)”
Ysr_Usreee,“Yanth Ur_10”,“Attendance Request Attestation”,14-Sep-2025,“nw form (Version - 1.0)”
Ysr_Usreee,“Yanth Ur_10”,“Attendance Request Attestation”,06-Sep-2025,“nw form (Version - 1.0)”
Ysr_Usreee,“Yanth Ur_10”,“Attendance Request Attestation”,06-Sep-2025,“nw form (Version - 1.0)”
Ysr_Usreee,“Yanth Ur_10”,“Attendance Request Attestation”,06-Sep-2025,“nw form (Version - 1.0)”
Ysr_Usreee,“Yanth Ur_10”,“Attendance Request Attestation”,06-Sep-2025,"nw form (Version - 1.0)