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

Importing a mess of data into a SharePoint list? PowerApps, ForAll and Patch to the rescue!

Video: https://www.youtube.com/watch?v=QgbPLxar0nA

 

If you work in SharePoint, you'll probably run into a situation where you need to bring a bunch of items into a list. In our on-prem SP2010 farm, we did this using Datasheet Mode, which wasn't fast, but was reliable. The Quick Edit function in SharePoint Online is better in some ways (like working with browsers other than Internet Exploder), but is horribly slow, prone to crashing the browser session, and worst of all, unreliable. 

 

There are other methods to do this, including third-party apps and Powershell, but apps still have to work inside of Microsoft's limitations and Powershell is...well, Powershell. So, then I had this crazy idea.

  1. Make sure the Excel file is clean (has no merged cells, etc.) and that the data you want is stored in a table in the file
  2. Create the list in SharePoint with column names (internal names, that is) matching the column headings in the Excel file
  3. Create a simple PowerApp with a button that imports the (static) data from the Excel table into a collection (may be superfluous, but collections are my new favorite toy in PowerApps)
  4. Add a button to write that data to the SharePoint list using Patch inside a ForAll statement against the collection.

It still took me about 10 mintues to set up the Excel file and the App, then about 7 minutes for the data (1,601 rows of it) to write into the list. This was after about an hour trying other methods and hitting a wall every time.

 

Now, the next project on my "when I have some free time" list is taking this idea and figureing out how to incorporate it into the existing Apps that work with other large SharePoint data imports in a way that is actually end-user-friendly.

1 REPLY 1
Community Support Team
Community Support Team

Re: Importing a mess of data into a SharePoint list? PowerApps, ForAll and Patch to the rescue!

Hi @ChadVKealey,

 

Thanks for your sharing here.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.