cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ktech
Level: Powered On

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
tutankh
Level: Powered On
6 REPLIES 6
tutankh
Level: Powered On

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

ktech
Level: Powered On

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.

tutankh
Level: Powered On
asmusz
Level: Powered On

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.

 

 

Super User
Super User

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.

tutankh
Level: Powered On

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.


 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,249)