cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jenor
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
abm
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 blogPower Automate Video Tutorials

View solution in original post

2 REPLIES 2
Jcook
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





abm
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 blogPower Automate Video Tutorials

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Users online (25,623)