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
You can use some part of this blog, in this it is creating records from one list to another using flow.
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:
The data structure of your SP List as below:
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:
Within the "Condition" action, left input box set to following formula:
right input box set to following formula:
middle input box set to is equal to.
Within the "Update Item" action, set the Id field to following formula:
set the Title field to following:
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:
Please consider take a try with above solution, then check if the issue is solved.
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?
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:
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:
then click "Done" button.
Please take a try with above solution, then run your flow again, check if the issue is solved.
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.
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:
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.
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.
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.
Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.
Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200