cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dbaldwin1
Regular Visitor

Excel (or CSV) to sharepoint list

New flow user here. 

 

I am trying to figure out if it is possible to create a flow that will monitor a sharepoint online/365 document library or ondrive folder for the addition of a new file with the name containing "Roster" and import the contents of the file into an existing sharepoint list.

 

Does anyone have any templates like this or examples of how to get started?

 

Thanks in advance,

Dave

1 ACCEPTED SOLUTION

Accepted Solutions
Runner55552 Advocate II
Advocate II

Re: Excel (or CSV) to sharepoint list

1. Double-check to make sure your Table in Excel has a range that includes all your rows.

2. Not sure what the purpose of your condition statement is. Are you trying to filter out any blank rows or rows with blank cells? It may be worth removing the condition and running the Flow without it.

3. I have used a similar Flow, but I wrapped the Create item action in a loop (Apply to Each) and this seems to work well.  I do not have any conditions, since I was not trying to filter out any rows.

4. In your List Rows action, click on the Advanced Options, and check your settings on total count or skip.  The skip field should be blank, but it may be good to put 1,000 into the top count field.  I have found that if you leave this field blank, sometimes it inserts an arbitrary limit, like 100.

 

See screenshot below. If this works, mark this as a solution.Flow_Excel_extract_rows.JPG

View solution in original post

18 REPLIES 18
Microsoft
Microsoft

Re: Excel (or CSV) to sharepoint list

Hi @dbaldwin1

 

I attached the screenshot on how to do that Flow.

 

1. Go to https://flow.microsoft.com/manage/flows/new

2. Select 'When a file is created' in onedrive (SPO/O365...)

3. Click on New Step -> Add a condition

4. In the 'Object Name' field select 'File Name'

5. 'Relationship' field select 'contains'

6. In 'Value' field type 'Roster'

7. Click on New Step -> Add an action

8. As the action select Sharepoint/ Create item.

 

Capture.PNG

dbaldwin1
Regular Visitor

Re: Excel (or CSV) to sharepoint list

This is great!  I didn't realize it would work this way.

I am not sure how to map the data though.  When I point it at my list it reads in the list columns and lets me select what to put in them but can you share the syntax for mapping a column from the CSV to a column in the list?

 

 

 

dbaldwin1
Regular Visitor

Re: Excel (or CSV) to sharepoint list

Capture.PNG

not sure what to do here.

Microsoft
Microsoft

Re: Excel (or CSV) to sharepoint list

@dbaldwin1 your scenario is a lil bit strange because the flow designer can't parse the columns unless you point to a specific excel file.

 

What i mean is, if, instead of using the trigger every time you get a file named 'bla' you set a recurrence to a specific excel file called 'bla', we can parse the columns and you can use them in the designer.

 

I would change your approach instead and i would build the following flow:

 

1. Create a file in your SPO/O365/Onebox called 'Roster' with the schema that you expect.

2. Go to flow.microsoft.com/manage/flows/new

3. Add a recurrence trigger

4. Add an action -> excel get rows pointing to the file called 'Roster'

5. Click on New Step -> Add an action

6. As the action select Sharepoint/ Create item.

7. In sharepoint, you will see the columns from the file created in step 1.

Capture.PNG

 

dbaldwin1
Regular Visitor

Re: Excel (or CSV) to sharepoint list

This is almost there.  I can adjust my needs since this is very early on.

I built as you proposed but when it reads the file it does so several times, creating many duplicate rows in sharepoint list.

Also, it seems that the Excel get rows only reads from OneDrive and not sharepoint document libraries, is that right?

Runner55552 Advocate II
Advocate II

Re: Excel (or CSV) to sharepoint list

I had this same question, as I was also attempting this.  I came to the same conclusion that it did not seem possible to parse fields from an Excel file within SharePoint.  Or is it possible that you just use the OneDrive file as the initial template to set up the parsing schema, then it would work on incoming files to SharePoint that had the same schema?

StevenZhang Helper III
Helper III

Re: Excel (or CSV) to sharepoint list

I got same issue, it import duplicated rows to sharepoint list. is there any update on that? Regards Steven
Rbert83 Advocate II
Advocate II

Re: Excel (or CSV) to sharepoint list

I like where your going with this, but the problem I run into is that when using the Excel Get Rows, I can't connect to a SharePoint on Prem, SharePoint Online, or anything but one drive and a few other connectors. I would just copy the file to my one drive but I can't find a flow that can copy an excel file saved in a SharePoint Library and copy it over to One Drive for Buz. Everything is One Drive towards SP.

 

Any clarification would be greatly appricated. I for one am just trying to one a week, have 1 specific table in an excel file be read, and that data copied to a SharePoint list, where it will create a new row for ever row in the excel table. It's basically a summary tab which will act as a history of the file in the SharePoint list. The reason for this is every week, this summary tab is changed with new data and I know we have versioning, but we just want this one table copied out as a quick way of doing a look up instead of digging back through past versions.


Thanks,
Rob

Rbert83 Advocate II
Advocate II

Re: Excel (or CSV) to sharepoint list

Also do you know if .xlsm will be supported in the future? Get Rows can't see that type of file, but was successful in testing with a .xlsx file.

Runner55552 Advocate II
Advocate II

Re: Excel (or CSV) to sharepoint list

I gave up on this long ago, as it forced me to use OneDrive to send data from an outside form source (Forms on Fire) through OneDrive to SharePoint. Since then, Forms on Fire, a great mobile forms design/deployment software, upgraded their software to allow direct transmission of data fields from their forms to Sharepoint lists.  I do not work for Forms on Fire, but they are a great company, and we have been using their software (subscription based) for almost a year now.

 

They have a free 14-day trial period, and a great tech support team.

anton-khrit Helper V
Helper V

Re: Excel (or CSV) to sharepoint list

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.

 

Then you can iterate throug result array and insert data into a SharePoint list.

Anonymous
Not applicable

Re: Excel (or CSV) to sharepoint list

Hi, I'm a new flow user and got a flow to take the rows of an Excel sheet and transfer it to a Sharepoint list to work for the most part. When I ran my flow, all of the rows from my Excel sheet transferred to my SharePoint list except for the last 13 rows. I tried refreshing the SharePoint list and running the flow a few times after, but I have no luck in getting the remaining rows to my list. I'm confused by this considering that I have only 270 rows in my Excel sheet, which is well below the maximum item number for SharePoint lists. Do you have any suggestions for how I can remedy this? Any help is appreciated. Thanks!

Runner55552 Advocate II
Advocate II

Re: Excel (or CSV) to sharepoint list

Firstly, make sure your Excel file has a table, with a name, and that all the rows you want are included in that table. Second, see if you have any columns in the list set to "Enforce Unique values," and if you do, see if you are trying to submit records that have that same value (they would then be prevented from loading to the list). Then, if that doesn't solve it, post screenshots of your Flow here, with all detail shown. 

Anonymous
Not applicable

Re: Excel (or CSV) to sharepoint list

Hi @Runner55552 , thank you for your suggestions. That didn't quite solve the issues so I'll post my screenshots: flow 1.PNGflow 2.PNGflow 3.PNG

In Condition, the first function is: empty(body('Get items')?['value']). This flow ran successfully as well which I'm not sure as to how if there were rows excluded. Thank you!

Runner55552 Advocate II
Advocate II

Re: Excel (or CSV) to sharepoint list

1. Double-check to make sure your Table in Excel has a range that includes all your rows.

2. Not sure what the purpose of your condition statement is. Are you trying to filter out any blank rows or rows with blank cells? It may be worth removing the condition and running the Flow without it.

3. I have used a similar Flow, but I wrapped the Create item action in a loop (Apply to Each) and this seems to work well.  I do not have any conditions, since I was not trying to filter out any rows.

4. In your List Rows action, click on the Advanced Options, and check your settings on total count or skip.  The skip field should be blank, but it may be good to put 1,000 into the top count field.  I have found that if you leave this field blank, sometimes it inserts an arbitrary limit, like 100.

 

See screenshot below. If this works, mark this as a solution.Flow_Excel_extract_rows.JPG

View solution in original post

Anonymous
Not applicable

Re: Excel (or CSV) to sharepoint list

@Runner55552this worked, thanks for the extensive solution!

Runner55552 Advocate II
Advocate II

Re: Excel (or CSV) to sharepoint list

Let me know which specific item worked. Was it the For Each Loop, or the removing of the condition, or other?

Anonymous
Not applicable

Re: Excel (or CSV) to sharepoint list

@Runner55552  It was the For Each loop. Thanks again!

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (5,804)