cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Creating a CSV file from Sharepoint

Hi All

 I am trying to create a CSV file from a SharePoint list and i would like to have the test fields in the format below, i have tried a few ways to create the file but seem to get double quotes around the fields.

 

""PULSAR"",""Nissan"",""N15"" ,01/02/2019 12:00:00,""Silver"",""InStock""

 

Would Like

"PULSAR","Nissan","N15" ,01/02/2019 12:00:00,"Silver","InStock"

Thanks

 

John

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Hi @JohnComm,

 

It seems that the Action card "Create CSV table" adds quotes to string values regardless if they are already there.  

 

You can verify your string and remove the quotes before passing to "Create CSV table" or you can add a Compose action card after the “Create CSV table” and add the expression:

          - replace(body('Create_CSV_table'),'""','"')

This should replace the double quote for one quote.

 

Please let me know if this is a solution to your scenario.

 
 
 

 

Best regards,

Ademar Urbano 

Power Platform Support Engineer

View solution in original post

6 REPLIES 6
Super User III
Super User III

Hi @JohnComm 

 

Did you tried using Power Automate action step Create CSV table?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Frequent Visitor

Thanks abm

 

That's what i am using to create the file the create CSV Table, i wanted to enclose the text fields in quotes but it appears to add some itself.

 

 

Hi @JohnComm 

 

Is any specific reason why you want to enclose the quotes? Could you post your Power Automate screenshot please?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Microsoft
Microsoft

Hi @JohnComm,

 

It seems that the Action card "Create CSV table" adds quotes to string values regardless if they are already there.  

 

You can verify your string and remove the quotes before passing to "Create CSV table" or you can add a Compose action card after the “Create CSV table” and add the expression:

          - replace(body('Create_CSV_table'),'""','"')

This should replace the double quote for one quote.

 

Please let me know if this is a solution to your scenario.

 
 
 

 

Best regards,

Ademar Urbano 

Power Platform Support Engineer

View solution in original post

Thank You Ademar

 

That worked fine.

 

Thanks all for your help

> replace(body('Create_CSV_table'),'""','"') For some reason Power Automate escapes the two double quotes inside the two single quotes. So when checking Peek Code, the following is done: { "inputs": "@replace(body('Create_CSV_table'),'\"\"','\"')" } So I can't seem to add quotes to my values. Employee_Name should be "Employee_Name" in the csv but what happens is """Employee_Name"""

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (3,979)