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

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
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.

View solution in original post

3 REPLIES 3
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.

View solution in original post

Jason01
Level: Powered On

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

Appreciate sharing!

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
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,324)