web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Export to Excel, choos...
Power Apps
Answered

Export to Excel, choosing order of columns

(0) ShareShare
ReportReport
Posted on by 697

Hello,

 

I don't know if this is a Power Apps question or Automate question, but I have a button in my App to export gallery data to Excel, which of course is done in automate.  It puts the columns in alphabetical order, however, which I don't want, I want a particular order. Is this something that can be done within powerapps?

Categories:
I have the same question (0)
  • v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @CharlesBrewer ,

     

    Did you pass the collection into a flow from the app, then create a csv table, and use it to create an excel file?

    If so, you can use the following similar code to generate a csv table in the app, and then pass it to the flow to create the file.

     

    vzhoqianmsft_0-1681455677582.png

    vzhoqianmsft_1-1681455723753.png

     

     

     

    Best Regards,

    Community Support Team _ habsburg Qian

    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • CharlesBrewer Profile Picture
    697 on at

    Hey there @v-zhoqian-msft ,

    Sorry for the delay I've been out. I am a little confused by your ClearCollect because it looks like you defining the data as if it's static? My data would be a bit more dynamic so I don't know if that would work, or am I misunderstanding?

  • Verified answer
    v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @CharlesBrewer ,

     

    If you want to use the data source of the gallery, the same applies. The key is the order of the columns in the Concat function. The result will be based on this order.

     

    vzhoqianmsft_0-1681782556431.png

     

     

     

    Best Regards,

    Habsburg Qian

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

  • AryaKar Profile Picture
    2 on at

    Hi @v-zhoqian-msft ,

     

    My code is quite big and I am getting the same issue. How do i correct the code to get the export without alphabetical ordering.

    AryaKar_0-1698052712866.png

     

    My export looks like this:

    AryaKar_1-1698052755370.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard