cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cyberco01
Level 8

MS Flow to create and update data from Excel in SP Document Library to Sharepoint LIst

I have an excel file kept at a Sharepoint Document Library. I need to access that excel file and compare the excel file and sharepoint list and create new items or update existing items if in the sharepoint list.

I need a MS Flow for the same. Kindl help

7 REPLIES 7
panand99
Level 10

Re: MS Flow to create and update data from Excel in SP Document Library to Sharepoint LIst

Hi @cyberco01 

 

You can use some part of this blog, in this it is creating records from one list to another using flow.

 

https://powerusers.microsoft.com/t5/PowerApps-Community-Blog/How-to-dynamically-create-records-from-...

 

 

Community Support Team
Community Support Team

Re: MS Flow to create and update data from Excel in SP Document Library to Sharepoint LIst

HI @cyberco01 ,

Could you please share a bit more about your scenario?

Do you want to sync your Excel table records into your SP List?

Further, could you please share a bit more about the data structure of your Excel table and your SP List?

 

I have made a test on my side, please take a try with the following workaround:

The data structure of my Excel table as below:1.JPG

The data structure of your SP List as below:2.JPG

Note: The Sno column is a unique column in my Excel table, which would added into the Title column in my SP List.

 

The flow's configuration as below:3.JPG

 

4.JPG

 

5.JPG

Within the "Condition" action, left input box set to following formula:

empty(body('Filter_array'))

right input box set to following formula:

true

middle input box set to is equal to.

 

Within the "Update Item" action, set the Id field to following formula:

item()?['ID']

set the Title field to following:

item()?['Title']

Note: Within my Excel table, the Sno column is a fixed column, which I do not modify it within my Excel table. The "List rows present in a table" action is from the Excel Online (Business) connector.

 

More details about using expression in flow actions, please check the following blog:

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
cyberco01
Level 8

Re: MS Flow to create and update data from Excel in SP Document Library to Sharepoint LIst

@v-xida-msft,

Thanks a lot for the solution.

I tried the solutiona as above.

My additions are not happening. I have around 2500 items in Excel and Sharepoint list.

When I see the flow history in the List Rows - I can see only 256 items. is there a limitation that way?

Kindly help.

 

Community Support Team
Community Support Team

Re: MS Flow to create and update data from Excel in SP Document Library to Sharepoint LIst

Hi @cyberco01 ,

It is an known limits with the "List rows present in a table" action in Microsoft Flow. In default, it could only retrieve 256 records from your data source once time.

Please consider take a try with the following workaround:9.JPG

 

10.JPG

Click "Settings" option of the "List rows present in a table" action, then configure the Pagination option as above, then click "Done".

Then do some operation for the "Get items" action of SP Connector in your flow.

 

After that, click the "Settings" option of the "Apply to each" action, then turn on the "Concurrency Control" option, and set the Degree of Parallelism option to the maximum value:11.JPG

then click "Done" button.

 

Please take a try with above solution, then run your flow again, check if the issue is solved.

 

Bestv regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
cyberco01
Level 8

Re: MS Flow to create and update data from Excel in SP Document Library to Sharepoint LIst

Hi @v-xida-msft,

 

Now the flow fetched all the records.

 

The Sharepoint already had rows from the excel.

I then added one row to my excel, so that it get updated in the Sharepoint List. 

The new row got added to Sharepoint List, but I can see for existing rows, another line is created.

Also, everytime it is going to the 'Create Item' condition, as my condition is evaluated as Yes. Also, the flow ended as failed.

Please note, the Party ID i am using to compare is a unique ID.

Community Support Team
Community Support Team

Re: MS Flow to create and update data from Excel in SP Document Library to Sharepoint LIst

Hi @cyberco01 ,

Could you please share a bit more about your flow's configuration?

 

I have made a test on my side, and don't have the issue that you mentioned. Please modify your flow configuration as below:14.JPG

When you compare the Party ID in your Excel table with the ID column in your SP List, please make sure the left input box value and the right input box value within the "Filter array" action have same data type.

 

Please check if you have typed a proper filter condition within the "Filter array" action in your flow.

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
cyberco01
Level 8

Re: MS Flow to create and update data from Excel in SP Document Library to Sharepoint LIst

@v-xida-msft ,

 

Very sorry to say. I am trying since 2 days. still my records are getting added instead of getting updated. As advised i checked if all my columns are same data type and they are of same data type. 

Sharing my excel file for your reference.

The vendor account and the party id in the excel will be unique and of type text or alphanumeric.

Kindly help.

 

Edited: With few records it is working absolutely fine. But the moment the whole list comes in the records count increases instead of only updating the existing records and adding new ones.

Initially when i run the flow, records count was 2528, then again when i run the flow the record count increased to 4958.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 284 members 4,255 guests
Please welcome our newest community members: