OfficeDev / OfficeDev/office-scripts-docs-reference

ExcelScript.SortOrientation.columns

Open
#415 1 comment 0 reactions 1 assignee View on GitHub

@alison-mk is already working on this.

Since Feb 24, 2026.

Needs: attention :wave: Type: doc bug
Dominant language
TypeScript
Stars
71
Forks
36
Avg merge
4d 14h
Merged PRs (30d)
12

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.