Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Exporting Table to CSV failing because special character

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I am building a flow which aims to take data of one dataverse table making it a CSV file we stock in a Sharepoint Repo thereafter. This is intended as a backup solution as the default save in CDS is one week and we may need to have to go back further. Anyway, I build a flow which I think the structure is good but I encounter some problems due to special characters.

 

Here is the build up of the flow :

Wukong_1-1637759548433.png

1. List Rows

2. Select

3. create a CSV Table

4. Compose message

 

First list the rows of my table and then select basically all the columns in it to create a CSV. The compose message is just here to change the " , " in " ; " to export the csv to avoid that parsing cut inside a string. I also added my values between || for this very reason.

Wukong_2-1637760068025.png

Now, the flow is failing because of the quotes (" ") inside text fields that are at the end of the string ; for ex 'my string "blabla" '. Which is automatically translated with escape character : ' \" "\ ' which make CSV corrupt because the last ones makes \"" breaking the stop. Here is the clear text :

it comes from the List rows output :

..., "crd7e_objetconvention":"C20-74 - contract \"Système pour déposer de manière contrôlée un fluide sur un substrat\"", ...

and starts to go off roads in the create CSV :

..., \"|C20-74 - contract \"\"Système pour déposer de manière contrôlée un fluide sur un substrat\"\"|\", ...

becomes this in the Select :

...
"|importsequencenumber|":"||","|crd7e_objetconvention|":"|C20-74 - contract \"Système pour déposer de manière contrôlée un fluide sur un substrat\"|","|crd7e_pslconventionsid|":"|2f212e5a-3e37-ec11-8c64-000d3a2cd1bb|","|statuscode|":"|1|","|

And here is the result in Excel, opening the CSV  :

|,"|C20-74 - contrart ""Système pour déposer de manière contrôlée un fluide sur un substrat""|",|2f212e5a-3e37-ec11-8c64-000d3a2cd1bb

As you see, it glued 3 fields together : the importsequencenumber + crd7e_objetconvention + crd7e_conventionsid

I tried to correct it with a parse Json action (as below) but, it's not a good option as it adds more steps and anyway, the schema fails as soon as one column is empty.

Wukong_0-1637758265363.png

So I am wraping my head around this since a couple of days, and didn't found the proper solution. If you guys have any suggestion I would be glad to read it.

Thanks.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492