Notifications
Announcements
Hi
I am trying to write a CSV file from a flow, I have an array object f JSON
Output is
I want something like this
I have more than 50 columns in total, some have numbe4rs, text, multiple text and dates, I am showing only 2 columns in this example.
any help please?
Before I answer properly, may I ask what is the destination for the CSV? Excel?
Try this, I don't really feel good about this method, but it does what you want, I bet @Jay-Encodian would know a better way. I have a way that is better than this if the destination is Excel, but I don't know where you are putting the data.
https://ibb.co/B2Y6v3w
Destination would be a document library, generated CSV will be emailed to a Shared mail box.
Just realised the expression isn't very clear in the screenshot above, here it is:
replace( body('Create_CSV_table'), '^', '"')
Basically putting a carat wherever a quote should go, you'll understand why I didn't just put a double quote if you try it.
You can use anything you like instead of a Carat ^_^
Thank you for replying, It worked with the test data. I have more than 50 columns, putting '^' with all 50 columns is doable but is there any other dynamic way?
I am currently using "Automatic" columns option in Create CSV action but if there is no other way, I will use this method.
That is kind of why I didn't like posting it, because of the number of columns you have. I do not know of another way, but I bet there is one and I'd like to know what it is.
Hold fire, I just thought of a better way 🤣 Let me test it quick.
No problem at all, I will definitely go for this method.
Just on a side note, there is a Powershell way of doing it as well. CSV will be emailed to a shared email box and that document library is mapped as a network drive and there I can run import-csv and export-csv and it generates the same csv with double quotes in it. I have tried it worked but I wanted to do in Flow.
I will definitely go with our solution.
yes, please if there is a better way.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 522 Super User 2025 Season 2
Tomac 364 Moderator
abm abm 243 Most Valuable Professional