cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Convert csv or textfile to a sharepointist

Hi All! 

 

I'm a newbie and trying to find out if there is a easy way to convert csv or text file directly to a SharePoint List?

I have been trying to do it from one drive or directly but cant find the way of how, or what step I need to make it work.

Can somebody help me step by step?

 

Thanks alot!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @Jenor 

 

There are no Microsoft CSV reader in Power Automate where you can read & parse all the values from a location. You could achieve this by using lots of string manipulation expressions using flow.

 

Here is my CSV file (SPList.csv) where each values are comma separated and each lines are separated by enter key (New line).

1,2,3
4,5,6
7,8,9

 

 

Follow the below steps:

 

First get the file from OneDrive.

 

image.png

 

Next step is get the filecontent

 

image.png

 

Next we need to use a Split expression to split each lines. For this we need to declare a variable called EnterKey and under the value just press the enter key.

image.png

 

The above split expression is as follows:

split(outputs('Compose'),variables('EnterKey'))
 
Next we need to read each lines then split each line values. So split each line  using comma (,) we need another split expression.
 
So to read each lines we need a foreach loop
image.png
 
Above I am using two split statements. 
First one is as follows. This will split each line values.
split(items('Apply_to_each'),',')
 
In my CSV file I only have three values in each line. So the index is going to be like 0, 1, 2
So to get the first value which is one use the below expression.
outputs('Compose_3')[0]
To get the next value use expression
outputs('Compose_3')[1]
and so on.
 
Here are my test results
image.png


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

View solution in original post

2 REPLIES 2
Super User III
Super User III

Hello,

So did you want the file as an attachment in the SharePoint site in a list.
Or did you want the file to be uploaded into SharePoint in a Document Library
Thanks

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others




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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Super User III
Super User III

Hi @Jenor 

 

There are no Microsoft CSV reader in Power Automate where you can read & parse all the values from a location. You could achieve this by using lots of string manipulation expressions using flow.

 

Here is my CSV file (SPList.csv) where each values are comma separated and each lines are separated by enter key (New line).

1,2,3
4,5,6
7,8,9

 

 

Follow the below steps:

 

First get the file from OneDrive.

 

image.png

 

Next step is get the filecontent

 

image.png

 

Next we need to use a Split expression to split each lines. For this we need to declare a variable called EnterKey and under the value just press the enter key.

image.png

 

The above split expression is as follows:

split(outputs('Compose'),variables('EnterKey'))
 
Next we need to read each lines then split each line values. So split each line  using comma (,) we need another split expression.
 
So to read each lines we need a foreach loop
image.png
 
Above I am using two split statements. 
First one is as follows. This will split each line values.
split(items('Apply_to_each'),',')
 
In my CSV file I only have three values in each line. So the index is going to be like 0, 1, 2
So to get the first value which is one use the below expression.
outputs('Compose_3')[0]
To get the next value use expression
outputs('Compose_3')[1]
and so on.
 
Here are my test results
image.png


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

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

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!

Users online (86,431)