Type of issue
Code doesn't work
Feedback
Hi
Sorting by rows works well, but sorting by columns does not always seem to respect the option for headings and moves them as part of the sorting.
myRange.getSort().apply( [{key: 0, ascending: true}], false, true, ExcelScript.SortOrientation.columns ); // This moves the column headings 😣 myRange.getSort().apply( [{ key: 0, ascending: true }], false, true, ExcelScript.SortOrientation.rows ); // This does not move the row headings 🙂
Page URL
https://learn.microsoft.com/en-us/javascript/api/office-scripts/excelscript/excelscript.rangesort?view=office-scripts
Content source URL
https://github.com/OfficeDev/office-scripts-docs-reference/blob/live/docs/docs-ref-autogen/excelscript/excelscript.rangesort.yml
Author
@o365devx
Document Id
cd738c17-bf7d-94ec-fd6f-6b3ea7dc6e95
Platform Id
86f698bc-a85b-7ad4-0631-6cffa1cbaa15
Type of issue
Code doesn't work
Feedback
Hi
Sorting by rows works well, but sorting by columns does not always seem to respect the option for headings and moves them as part of the sorting.
myRange.getSort().apply( [{key: 0, ascending: true}], false, true, ExcelScript.SortOrientation.columns ); // This moves the column headings 😣 myRange.getSort().apply( [{ key: 0, ascending: true }], false, true, ExcelScript.SortOrientation.rows );// This does not move the row headings 🙂Page URL
https://learn.microsoft.com/en-us/javascript/api/office-scripts/excelscript/excelscript.rangesort?view=office-scripts
Content source URL
https://github.com/OfficeDev/office-scripts-docs-reference/blob/live/docs/docs-ref-autogen/excelscript/excelscript.rangesort.yml
Author
@o365devx
Document Id
cd738c17-bf7d-94ec-fd6f-6b3ea7dc6e95
Platform Id
86f698bc-a85b-7ad4-0631-6cffa1cbaa15