Excel: Sort sheets

Sort sheets alphabetically (A-Z or Z-A).

Help Centre › Building Processes

Sort sheets alphabetically (A-Z or Z-A).

Runs on: macOS and Windows only.

Add it to a process

In the process designer, open the Add step tab. Find Sort sheets under Excel › Sheets, or type its name in the search box, and drag it onto the canvas.

Fields

FieldRequiredWhat it does
File pathNoEnter the file path, or use a variable such as {folders::desktop::path}\file.xlsx. Leave blank to use the workbook an earlier step opened.
OrderNoSort direction for the sheets Choices: Ascending (A-Z), Descending (Z-A). Default: asc.
Pin at startNoComma-separated sheet names to keep at the beginning
Pin at endNoComma-separated sheet names to keep at the end

See all Excel steps.

Errors

ErrorDescription
File not openThe Excel file must be open

Tips

  • Use Pin at start to keep summary or index sheets at the front (e.g. "Summary, Index")
  • Use Pin at end to keep reference or lookup sheets at the back (e.g. "Lookup, Config")
  • Pinned sheets maintain the order you specify; all other sheets are sorted alphabetically between them

Related functions

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.