We have many tables in our application Tables that can be sorted, filtered, grouped

When user chooses to export a sorted table to excel, I wonder what is the best way to display the sorted columns?

2 Answers 2


I would hand over the information in the filename. Something like 'My cheese collection (sorted by expiry date).xlsx'.

  • Thanks Johannes, in our application, we can choose more than one sorted column. For example, we can have a primary sort and a secondary sort column. can we use an indication in excel itself on the column? is it possible? Aug 16, 2021 at 6:13
  • Also, our filename today is based on the entities type in the table and the snapshot date and time Aug 16, 2021 at 6:59

Excel doesn't flag which column was last used for sorting. To Excel, in fact, a sorted and unsorted column are the same.

There are two ways you could do it. One, you could mark the sort columns by adding some text or formatting, or both. For instance, you might make the primary sort column dark blue and the secondary one light blue. This can be done programmatically. For end users I would pick this.

Alternatively, you could add this data to cells of the spreadsheet itself in a new column or row or sheet where you list various metadata about the workbook. Personally, I dislike this organization style, but I see it a lot, and it does make it easier for another program to retrieve the metadata.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.