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 Apps
Unanswered

Export data to CSV

(0) ShareShare
ReportReport
Posted on by 79

Hello

I am watching one year old video on youtube on how to export data from power apps with help with power automate.

Now they have a gallery with collection in the video.

 

My question is, do I need it to be in collection or gallery to be able to export some data?

I want to export some few data, like 10-12 diffrent values.

My app does not contain any gallery or collections. And the app works like I wanted now.

It is just the export of some data I want now.

 

What options do I have today with that? Is Power Automate the best option?

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

    Hi @JCB02 ,

     

    In my opinion, you may need Power Automate to export data to CSV file , and it is not very complicated.

     

    Based on your description, I have made a simple test for your reference.

     

    As follows, I export values in two labels to a CSV file in my test:

    vjefferni_0-1667556483744.jpeg

    vjefferni_1-1667556483748.png

    vjefferni_2-1667556483751.png

    Result:

    vjefferni_3-1667556483753.png

     

    Best regards,

  • Karen_Fan Profile Picture
    13 on at

    Hi @v-jefferni ,

     

    My exported data is displayed like below:

    Karen_Fan_0-1669014934480.png

     

    So, my question is:

    1. how can I show data in red box in the text format rather than record format?

    2. How can I only show day without time?

     

    Thanks!

     

  • mahalakshmij_03 Profile Picture
    32 on at

     

    Hi @Karen_Fan ,
     
    Try follow this method
     
    ForAll(colPreview,Collect(Colnew,{ID:ThisRecord.ID,Function:ThisRecord.Function.Value,Status:ThisRecord.'Status',Log Note:ThisRecord.Log})); Set(varFileLocation,ExportExcel.Run(JSON(Colnew,JSONFormat.IncludeBinaryData & JSONFormat.IgnoreUnsupportedTypes)).filelocation)); Launch(varFileLocation); Clear(colPreview);
     
    Thanks 
    Maha
  • Karen_Fan Profile Picture
    13 on at

    Thank you @mahalakshmij_03 ! It works!

  • JCB02 Profile Picture
    79 on at

    @v-jefferni Thanks

    I will look into it now.

    Power Apps say this:

    "The function 'ClearCollect' has some invalid arguments"

    And my app dont have any collection or gallery

  • JCB02 Profile Picture
    79 on at

    @v-jefferni , or anyone else that know the answer

    And I don't know why someone had accepted your answer as a solution to my question when it not was the answer to my question at all. So I removed the solution on this thread.

     

    My question is still the same:

    Do I need it to be in collection or gallery to be able to export some data?

     

    When I try your answer my power apps did say this:
    "The function 'ClearCollect' has some invalid arguments"

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Hi @JCB02 

     

    I don't believe it *has* to be in a collection or gallery.  However, the JSON formula requires some kind of structure:

    Rusk_0-1670534135423.png

     

  • JCB02 Profile Picture
    79 on at

    @Rusk Hello

    Thanks for answer.

    So what does it mean? Can I somehow export as it is now in my app?
    How would that bit of code look like, if I wanted to export this labels:

    "lbl_1", "lbl_2", "lbl_3", "lbl_4", "lbl_5", "lbl_6"

     

    My app work as I want now, and I would be glad if it was possible to just export the labels I wanted in the way it is now.

     

    Thanks

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Hi again,

     

    So for that many labels, you will need a collection it looks like.  This is because the formula JSON only can accept 1-2 values:

    Rusk_1-1670612694380.png

     

    For this reason, @v-jefferni recommended simply making a collection to gather the info in the labels.  If your app is already working as you like, this will not break anything in your existing app.  You will only group your existing labels into the collection for the export to CSV, and won't need to change other parts of your app.

     

    I tried the formula that was recommended above and it works perfect:

    ClearCollect(
     collection,
     lbl_1.Text,
     lbl_2.Text,
     lbl_3.Text,
     lbl_4.Text,
     lbl_5.Text,
     lbl_6.Text
    );
    ExportCSV.Run(JSON(collection))

    The export also worked when I created a flow as detailed above:

    Rusk_2-1670613100876.png

     

  • JCB02 Profile Picture
    79 on at

    @Rusk Thanks for answer.

    I am trying to follow the guide step by step here.

    But when I am creating a flow, and the step where to "Create CSV table"

    Then I don't get it to be like in the guide in here.

    I do get Columns, (That is not in the guide in this thread)

    1.png

     

     

    And I cant find Body in the Value 

    2.png

     

    So, as it is now, I cant test your latest answer to me to export my app data 😕

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard