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 data to csv com...
Power Apps
Unanswered

Export data to csv comes with many brackets

(0) ShareShare
ReportReport
Posted on by 426

Can someone advise one how to get a cleaner data export. 

Currently i have a collection that is being exported out to CSV file however i get alot of brackets.

nchandran_0-1617777292369.png

Below is the syntax to export collection to csv.

ClearCollect(ColConsumAll,AddColumns(ColConsumMain,"OrderNo",Filter(ColConsumDetails,MasterID=ID).OrderNo,"NCRNo",Filter(ColConsumDetails,MasterID=ID).NCRNo,"Description",Filter(ColConsumDetails,MasterID=ID).Description,"OpsNo",Filter(ColConsumDetails,MasterID=ID).OpsNo,"WorkCentre",Filter(ColConsumDetails,MasterID=ID).WorkCentre,"Batch",Filter(ColConsumDetails,MasterID=ID).Batch,"HeatNo",Filter(ColConsumDetails,MasterID=ID).HeatNo,"Mass",Filter(ColConsumDetails,MasterID=ID).Mass,"Qty",Filter(ColConsumDetails,MasterID=ID).Qty,"Dia",Filter(ColConsumDetails,MasterID=ID).Dia,"Brand",Filter(ColConsumDetails,MasterID=ID).Brand,"PartNo",Filter(ColConsumDetails,MasterID=ID).PartNo,"Balance",Filter(ColConsumDetails,MasterID=ID).Balance));Set(ConsumableSumVar,Exporttoexcel.Run(JSON(ColConsumAll,JSONFormat.IncludeBinaryData)));Download(ConsumableSumVar.filelink)

Categories:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @nchandran,

    Based on the issue that you mentioned, do you want to remove the brackets within the CSV file?

    Could you please tell me that how you configure your flow?

    I think the key to the issue may be that your variable is a type of array. I guess that you want to pass array of multiple objects which should contain multiple objects, that needs to be bind into an array, otherwise it will not be a valid JSON.

    If so, here is a similar thread that you could check for details.

    Solved: I don't want any square brackets "[ ]" around my a... - Power Platform Community (microsoft.com)

    If the above could not work, please provide your flow configuration.

    Hope it could helps.

    Regards,

    Qi

     

  • nchandran Profile Picture
    426 on at

    I actually followed Reza's video on exporting to excel. Here is the flow screenshot. I find it complicated to follow the solution you sent me since its not a array type of configuration.

    nchandran_0-1617838325581.png

     

  • nchandran Profile Picture
    426 on at

    bump, can someone help me on this please.

  • nchandran Profile Picture
    426 on at

    @v-qiaqi-msft Are you able to suggest a solution, the example you sent me did not quite align with what i am using.

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard