cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rana
Helper I
Helper I

How to generate CSV file without commas in the values

Hi,

 

I'm using power automate to generate a CSV file based on the columns in a SharePoint List. Is it possible to remove the commas inside a column while generating the CSV file. My CSV file looks like below and I want to remove the Commas in columns like "Requested By" and "Customer Name".CVS.PNG

 

Regards

Rana

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

dont use the [Requested By] field on its own in your output record to the CSV destination, use:

 

replace(<requested by object>,',','')   and use the expression builder to create this expression.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

dont use the [Requested By] field on its own in your output record to the CSV destination, use:

 

replace(<requested by object>,',','')   and use the expression builder to create this expression.

rohsh354
Community Support
Community Support

Hello,

 

Yes, the suggestion provided by @Anonymous  should help resolving your issue.

 

 

 

 

Hi @Anonymous  ,

 

Thanks for your reply. I'm new to PowerAutomate , could you let me know how to include the field that we need to replace inside the expression. When I click on the Dynamic content I can only see below two options and can't see the list field there.

Expression.PNG

Regards,

Rana

Anonymous
Not applicable

OK. you need to go back a step or two...

 

I assume you have (or need to have) a process as follows:

 

Get Rows (from excel worksheet)

   For Each Row

      Get required fields (columns)

      Process fields for conditions, changes, etc

      Write CSV row

  Loop

 ...

End

 

I'm guessing you've got the "Get Rows" bit as that is probably returning the "list of Items" and Values fields you are seeing.

So you need a "loop" (for each...) to cycle through each row in the file (data set).

 

After your "get Rows" action you need an "Apply to Each" action which takes a single input value, and you should put the "value" object there.

 

Now within the "Apply to Each" block you can put your actual field processing, and its here that you will then see a long list of available objects, including "Requested By", etc.

 

At some point you're going to have a "write record" action of some sort. If you're writing a CSV file this may just be a long string varaible to which you append each field in turn. In this field or in a field item in an action, you would then use the "object" from the source file however you wish, such as:   replace(<requested by object>,',','')

 

Good luck!

 

 

Hi @Anonymous ,

 

Thanks for the detailed explanation. I was able to get this to work. 

 

Regards,

Rana

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (5,125)