Arrange worksheets in alphabetical order

Note: Edited by moderators as the forum language is English. This is a requirement for search to work. See original text below the break.


Hello,

I export the tables from Revit to Excel, where each table becomes a spreadsheet, all in the same XLS file. But I the spreadsheets do not appear in alphabetical order. How do I make this happen?

See how is my dynamo:

I already tried to put sort.list on virtually all connections and got no result. Anything else I need to do to make it work?


original text


Olá,

eu exporto as tabelas do Revit para Excel, onde cada tabela vira uma planilha, tudo no mesmo arquivo XLS. Porém eu as planilhas não aparecem em ordem alfabética. Como eu faço para que isso venha a acontecer?

Veja como está o meu dynamo:

Eu já tentei colocar o sort.list em praticamente todas as conexões e não consegui resultado. Algo a mais que eu preciso fazer para dar certo?

You need to use SortByKey to sort the data lists by the sheetName inputs.

Hi! where can i insert the sortByKey in this dynamo?

SortByKey sorts a specified list based on a matching list of keys (it also sorts the keys). As I said, you want to sort your data inputs (lists) by the sheetName inputs (keys). This will sort the sheet names alphabetically while also sorting the matching data into the same order so everything stays lined up.

english translation by moderators - original text below the line

Hello, how are you? I appreciate your help. I managed to make it work. Spreadsheets are now in alphabetical order within Excel. I just had to use list.reverse along with list.sortbykey as well. Look:

Thank you!


original text below the line


Olá tudo bem? Eu agradeço a sua ajuda. Eu consegui fazer funcionar. As planilhas agora estão em ordem alfabética dentro do Excel. Apenas tive que usar também o list.reverse junto ao list.sortbykey. Veja:

Muito obrigado!

That must be due to the way tabs get created in Excel. It must put new tabs at the beginning. This would be why you’d have to add your tabs in reverse order.

Post translated by moderators - original text below line

Yes! It was just that. Thank you!


Original text below


Sim! Foi exatamente isso. Obrigado!

@Glauber_Omma glad you got this solved. Please try to keep a translation of your posts in English in the future.

Also, if a post solves your problem be sure to make it as a solution.

These two small efforts by all users are required for future forum visitors to find solutions via search.

Thanks!

Sorry, but my native language it´s portuguese (Brazil).

1 Like