cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GerryL
Level: Powered On

Update Sharepoint List From Excel File

Hi,

 

I have a complex Excel file that uses a connection to an Access query, which is pulling from a SQL database. I already figured out how to turn the Excel report into a Sharepoint list. But what I want is for the list to be a (close to) real time version of the Excel as changes occur to it. Bascially, I just want a live Sharepoint list. Is there any way to get at least part of this accomplished with Flow? 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Update Sharepoint List From Excel File

Hi @GerryL,

 

Could you please share more details about your Excel file?

Has the data of your Excel file been formatted as a table?

Further, do you want to update your SharePoint list when some changes occured to your Excel file? 

 

I assume that your SharePoint list has same data structure with that in your Excel file and the data of your Excel file has been formatted as a table. In addition, I assume that there is a column in your Excel table (or SharePoint list) could uniquely identify a record (or a item). I have created a Excel file (Stored in my OneDrive for Business folder) on my side and the data structure of it as below:1.JPG

The data structure of my SharePoint list as below:2.JPG

Note: The Email Address column could identify one record in my Excel table (or one item in my SharePoint list) uniquely.

 

There is no trigger could detect if there are some changes in a Excel file in Microsoft Flow currently, I afraid that there is no way to achieve your needs directly in Microsoft Flow. If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

In addition, you could consider take a try with the following workaround as an alternative solution:

  • Add a "When a file is modified (properties only)" trigger, specify Folder value.
  • Add a Condition, left input box set to Display name dynamic content of the trigger, right input box set to Employees.xlsx (Set to your Excel file name), within middle drop down, choose is equal to
  • Within "If/yes" branch of Condition, add a "Get rows" action, specify File name and Table name. Add a "Apply to each" action, input parameter set to output of "Get row" action.

         Within "Apply to each" action, add a "Get items" action, specify Site Address and List Name. Add a "Apply to each 2" action, input parameter set to output of "Get items" action.

 

         Within "Apply to each 2" action, add a "Update item" action, specify Site Address and List Name.

 

Image reference:3.JPG

 

4.JPG

The flow works successfully as below:5.JPG

 

 

Best regards,

Kris

 

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.

View solution in original post

12 REPLIES 12
Community Support Team
Community Support Team

Re: Update Sharepoint List From Excel File

Hi @GerryL,

 

Could you please share more details about your Excel file?

Has the data of your Excel file been formatted as a table?

Further, do you want to update your SharePoint list when some changes occured to your Excel file? 

 

I assume that your SharePoint list has same data structure with that in your Excel file and the data of your Excel file has been formatted as a table. In addition, I assume that there is a column in your Excel table (or SharePoint list) could uniquely identify a record (or a item). I have created a Excel file (Stored in my OneDrive for Business folder) on my side and the data structure of it as below:1.JPG

The data structure of my SharePoint list as below:2.JPG

Note: The Email Address column could identify one record in my Excel table (or one item in my SharePoint list) uniquely.

 

There is no trigger could detect if there are some changes in a Excel file in Microsoft Flow currently, I afraid that there is no way to achieve your needs directly in Microsoft Flow. If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

In addition, you could consider take a try with the following workaround as an alternative solution:

  • Add a "When a file is modified (properties only)" trigger, specify Folder value.
  • Add a Condition, left input box set to Display name dynamic content of the trigger, right input box set to Employees.xlsx (Set to your Excel file name), within middle drop down, choose is equal to
  • Within "If/yes" branch of Condition, add a "Get rows" action, specify File name and Table name. Add a "Apply to each" action, input parameter set to output of "Get row" action.

         Within "Apply to each" action, add a "Get items" action, specify Site Address and List Name. Add a "Apply to each 2" action, input parameter set to output of "Get items" action.

 

         Within "Apply to each 2" action, add a "Update item" action, specify Site Address and List Name.

 

Image reference:3.JPG

 

4.JPG

The flow works successfully as below:5.JPG

 

 

Best regards,

Kris

 

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.

View solution in original post

diegoadum
Level: Powered On

Re: Update Sharepoint List From Excel File

Hi there! is this solution (very good by the way) insert and update records or we just need to add that verification as an if condition?

 

Regards,

 

Diego!

Anonymous
Not applicable

Re: Update Sharepoint List From Excel File

Hi @v-xida-msft

 

Thanks for the nice workflow. However, does this solution implies that the number of rows in the excel file (and in the SP list) is the same? What if the number of rows in the Excel is greater than what the rows in SP are? I assume there will be the need for checking the contents of the SP vs these of Excel and then a 'create item' outside the apply to each loop. 
I got a question here, but I have not figured out the solution from your proposed flow.
Thanks for helping. 

ling
Level: Powered On

Re: Update Sharepoint List From Excel File

Hi @v-xida-msft,,

 

I'm not the OP, but found this while trying to do something similar.

 

One question about your solution: where in the flow do I specify which column should be used as unique identifier when running the update?

In my case, I have added a column in SP list called "Row ID", which takes the data from Excel Table's row ID (which is unique, I think?)

 

Thanks!

erikah
Level: Powered On

Re: Update Sharepoint List From Excel File

@v-xida-msft 

Hello! I'm trying to do the same thing but my file is in a shared document folder in Sharepoint. This is the easiest place for it to be because of ever-changing permission. I'm also trying to complete this trigger through Powerapps. I've attached what I copied. Any help is greatly appreciated. My ultimate goal is to be able to connect is to that I can create a status bar in Powerapps that Management can see. flow2.pngflow1.png

BenFetters
Level 8

Re: Update Sharepoint List From Excel File

Hello,

I have noticed that this is no longer possible now that there isn't a "Get Rows" action available. Is the new action get tables or what do I need to do in order to accomplish this now?

 

Thanks,

 

Ben Fetters

danwolthers
Level: Powered On

Re: Update Sharepoint List From Excel File

I would like to know that as well, have been browsing everywhere, but found nothing that can make this happen anymore - why did they remove this feature?

BenFetters
Level 8

Re: Update Sharepoint List From Excel File

What I ended up doing is using the list rows present in table. That ended up being pretty much the same things and seemed to work just fine.

 

Hope that helps!

 

Ben Fetters

SachinKukreja
Level: Powered On

Re: Update Sharepoint List From Excel File

@danwolthers, can you also advise which filed in the flow helps identify the common filed which is present b/w the excel and the sharepoint

danwolthers
Level: Powered On

Re: Update Sharepoint List From Excel File

@SachinKukreja , I set up a recurrence on twice a day, more than that is not worth it for me - you can set it up however you prefer.

After that:

  1. List rows present in table;
  2. Get items is your SP list you want to update;
  3. Create a compose html link with the table (whatever column you want to update);
  4. Update SP list item with the HTML created on step 3.

 

Screen Shot 2020-01-13 at 12.56.59.png

SachinKukreja
Level: Powered On

Re: Update Sharepoint List From Excel File

image.pngimage.pngimage.png@danwolthers  thanks so much for your quick response.. i was able to run the flow as you advised and the flow showed as successful too.. but it did not create any item on the sharepoint.. what wrong am i doing? i wanted to create a new item on the share point if a new line is created in excel and modify the existing share point list item if the existing line in the excel is updated. 

Plus when i now run the flow in live data, it throws out an error as well

image.png

 

 
 
 
 

image.pngimage.pngimage.pngimage.pngimage.png

danwolthers
Level: Powered On

Re: Update Sharepoint List From Excel File

@SachinKukreja make sure the table columns on your spreadsheet are exactly the same name as in your SP list. Also check on your Get Items if you specified the Filter Query, like this: Title Eq'("Column id")

 

Screen Shot 2020-01-13 at 14.48.33.png

 

 

 

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,655)