---
title: "Sorting with Advanced Table Viewer macro"
canonical: "https://support.appfire.com/space/TBL/1540654640/Sorting%20with%20Advanced%20Table%20Viewer%20macro"
format: markdown
---
> Macro (aura-html)

The Advanced Table Viewer macro enables you to sort the column values on the Confluence page and organize table data efficiently.

- The macro enables the sort feature by default when you insert it for the first time.
- The macro saves the sort configuration set in macro setup mode as the default.
- When sorting is enabled, you can sort table data without edit permissions.
- When sorting is enabled, you can sort columns in both the **Edit** and **View** modes of the Confluence page.

## Using Sort in the Advanced Table Viewer macro

> Macro (refined-tabs)
> 
> > Macro (refined-tab)
> 
> > 📝 You need edit permissions to access the setup mode.
> 
> - Edit the macro to open the setup mode. Refer to <u>[Setup the Advanced Table Viewer macro features](https://appfire.atlassian.net/wiki/spaces/TBL/pages/1765147138)</u>.
> - The macro enables the sort feature by default when you insert it for the first time.
> - To disable sorting, click the Sort icon ().
> - Click **Save**.
> 
> > Macro (refined-tab)
> 
> - To sort a column, click its column header. The macro sorts the column and displays the sort icon.
>   - You can click the specific column header to switch between ascending and descending order.
>     - Ascending order ( ): Sorts column values from lowest to highest (A–Z or 0–9).
>     - Descending order ( ): Sorts column values from highest to lowest (Z–A or 9–0)
> - The table rows reorder based on the sorted column. For example, the **Item** column is sorted in ascending order.
> - Click **Save**. The macro saves the sort configuration set in macro setup mode as the default for every refresh of the Confluence page.
> 
> > 📝 If you disable the sort feature in macro setup mode, it is unavailable in both the edit and view mode of the Confluence page.
> 
> > Macro (refined-tab)
> 
> - Once sort is enabled, you can sort the columns in Confluence page edit, view, and full-screen mode.
> - For example, in the page view mode, the column **Tax** is sorted in descending order.