OfficeDev / OfficeDev/office-scripts-docs-reference

Excel Script to Sort Whole Sheet based on a Column

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

@alison-mk is already working on this.

Since Aug 17, 2026.

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

Description

Type of issue

Code doesn't work

Feedback

I have a Simple Excel File with Column Labels, 300 Lines of Data, 30 Columns.
What is the simplest Script to Sort by Column D, then Column E, then Column E?
I can easily do it manually with Excel Sort.
Script Editor Recording my steps doesn't work.

Page URL

https://learn.microsoft.com/en-us/javascript/api/office-scripts/excelscript/excelscript.tablesort?view=office-scripts

Content source URL

https://github.com/OfficeDev/office-scripts-docs-reference/blob/live/docs/docs-ref-autogen/excelscript/excelscript.tablesort.yml

Author

@o365devx

Document Id

f2167a84-fa9b-7456-c984-d41360060f37

Platform Id

8afaef52-6d8d-454f-a1d4-c77ce09338d2

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.