cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

convert CSV string to table

Hi,

I have an API wich return a text, suppossed to be a csv file, in the form below :

datetime;mois;semaine;joursem;heure;vacance;Text;freQ;Scored Labels
7/15/2017 6:00:00 PM;7;28;7;18;1;29,234;67;148,2313385
10/14/2016 4:00:00 AM;10;42;6;4;0;18,922;0;-9,692166328
02/04/2017 12:00;2;5;7;12;0;9,239;0;39,99219513
05/11/2017 05:00;5;19;5;5;0;17,421;0;1,262338638
10/01/2016 13:00;10;40;7;13;0;22,333;2;-0,870968521
11/20/2016 6:00:00 AM;11;48;1;6;0;11,83;0;-13,13813114
10/18/2016 4:00:00 PM;10;43;3;16;0;20,529;42;46,49481583
2/23/2018 9:00:00 AM;2;8;6;9;0;1,231;0;1,8540411
01/05/2017 05:00;1;1;5;5;1;6,426;0;0,300328046

I don't need to save a csv file, I need to transform this to a table to save 2 specifc columns on a sharepoint list.

I tried create CSV table but, I can't make it work.

 

Thank you for your help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate III
Advocate III
9 REPLIES 9
Highlighted
Advocate III
Advocate III

Re: convert CSV string to table

 

The short answer is that there is not currently a csv parsing function in Flow.  The somewhat longer answer is that depending on how reliable your csv content is, it may be possible. You'd need to write some loops to create an array of json objects that contain your data... then you could parse through the json more or less normally

CSV to JSON.png

Highlighted
Advocate II
Advocate II

Re: convert CSV string to table

Thanks you for your helps.

 

Can you give me an exmle of this loop ? le toos an an expemple of the code.

 

Thank you.

Highlighted
Advocate III
Advocate III
Highlighted
Advocate I
Advocate I

Re: convert CSV string to table

All the answers on this topic are SOOOO much more complicated than it should be!

 

We have an Import-CSV command in powershell that takes CSV data and makes an object.... there should be the same thing that works just as easily in MS Flow/Logic apps.  

 

So frustrated that MS has not yet fixed this.

 

 

Highlighted
Helper V
Helper V

Re: convert CSV string to table

You can use Parse CSV action from Plumsail Documents connector. It allows you to convert CSV into an array and variables for each column. Please read this article demonstrating how it works.

 

Once you parsed CSV file you can iterate through result array and insert specific column values into SharePoint as you wanted.

Highlighted
Advocate III
Advocate III

Re: convert CSV string to table

This would probably work, but I don't think it's reasonable to spend over $300 a year for something that should be a base option.


@anton-khrit wrote:

You can use Parse CSV action from Plumsail Documents connector. It allows you to convert CSV into an array and variables for each column. Please read this article demonstrating how it works.

 

Once you parsed CSV file you can iterate through result array and insert specific column values into SharePoint as you wanted.


 

Highlighted
Regular Visitor

Re: convert CSV string to table

I don't have access to the destination forum but need this solution....Could the solution be completely duplicated here?

Highlighted
Advocate I
Advocate I

Re: convert CSV string to table

I still can't believe that Microsoft has not made parsing a CSV part of the basic options/actions available in Power-Automate/Flow.  I've been advocating for this for literally years now.  C'mon MS!! This is a "standard" OOB function in almost all scripting languages, including PowerShell!  This is also one of the oldest and most common "data exchange" formats.

Highlighted
Frequent Visitor

Re: convert CSV string to table

Hi,

I am trying to parse csv to filter it with power automate to distribute the right document to the right person, I am interested by you process, could you share the flow and not the result to really understand what action you are doing within it ?

 

Thanks !

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,320)