cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

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 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

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.

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

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.

View solution in original post

Regular Visitor

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

Appreciate sharing!

Highlighted
Super User
Super User

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

Hi @ChadVKealey 

You are going to love Collections even more!  You can move data from Excel to SharePoint even easier.  If your fields have the same name you can simply Collect(YourSharepointList, YourExcelTable).   Even if the column names are different, you can use the shaping functions like ShowColumns, RenameColumns etc. to make your Excel table columns match those in the SharePoint list.  The requirement is that the column names and number of columns be an exact match.    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,066)