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 / Exporting CSV file wit...
Power Apps
Answered

Exporting CSV file with complex columns

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello, I have a gallery listing records from a SharePoint list. I need a button to export the gallery to a CSV file. Using JSON, complex column types aren't allowed. I have quite a few complex columns (of type choice) that I need to output to the CSV file. Is there anyway around this? Thanks.

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    I'd try creating a collection of your data first and in this action, convert all complex types to simple types. Just an idea.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    How would I go about that? I can't seem to find anything online

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Anonymous 

    There's probably a few ways to do this but I'd just create a collection from scratch ie

     

    // Clear collection first
    Clear( myCollection);
    
    // Create collection from gallery
    ForAll( yourGalleryName.AllItems As colCSV, 
     Collect( myCollection,
     {TextColumn1: colCSV.TextColumn1Name,
     TextColumn2: colCSV.TextColumn2Name,
     ChoiceColumn1: colCSV.ChoiceColumn1Name.Value
     // .... add extra columns required as needed ...
     }
     )
    )

    Note: This assumes that your Choice columns are all single choice only, not Multi choice options.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much!

  • elinvangbo Profile Picture
    22 on at

    Hi! 

     

    Thank you @Anonymous, this was exactly what I was looking for!

     

    I have multiple choice columns (choices columns) as well and I found this workaround to get it as a string: 

     

    ChoicesColumn1: Concat(colCSV.ChoicesColumn; Value; ", ")

     

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard