cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Importing Excel to Sharepoint with PowerApps function

Is there a way to build a function to import excel data into an existing sharepoint list?

My app is a database which tracks items and their data, ~20 colums per item. Right now, I've standardized the excel template so it can be copy and pasted directly into sharepoint but I'd like to intergrate this into a function inside of the app itself. 

My assumption is that I would have to connect to a button, have Powerapps create a collection from the data, then store it into the Sharepoint list, but I'm a little hazy on where to start.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Importing Excel to Sharepoint with PowerApps function

Hi @tbenge05 ,

Based on your description, you could refer this:

1)format your data of Excel to a table

   create columns in sharepoint list 

2)connect with your Excel file and sharepoint list

3)save your data of Excel to collection

Collect(collection1,tablename)  

4)format your collection data

Collect(collection2,RenameColumns(
ShowColumns(collection1,"field1","field2","field3"),
"field1","field11","field2","field22","field3","field33"))
//if you only want to update 3 fields of sharepoint list, you could use ShowColumns to reduce the number of fields
if the fields name in excel and sharepoint list are different, you could use RenameColumns to change the fields' name(to make them the same as those in sharepoint list)

5)update your sharepoint list with this collection

Collect(listname,collection2)

Here are docs about the functions that I use for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-clear-collect-clearc...

 

What's more, if your record number is larger than 2000, you will meet delegation problem.

Then your data can not updated successfully.

Please change this limit to 2000.delegation.jpg

Then, modify your fucntions.

Here's a doc about delegation for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
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

4 REPLIES 4
Highlighted
Super User
Super User

Re: Importing Excel to Sharepoint with PowerApps function

Hi @tbenge05 

 

You can much easily do this on Microsoft Flow and then trigger it in the PowerApp. 

 

Why don't you:

1. Trigger the Flow in the PowerApp that fetches the data from the database

2. Flow gets the data and replicates it into the SharePoint

3. Update/store the rows added so that, next time you run the PowerApp you don't re-import them.

 

Do you think this would work for you?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Highlighted
Regular Visitor

Re: Importing Excel to Sharepoint with PowerApps function

I'll have to do some research into Flow, I'm heavily unformiliar with it. Thank you for the suggestion.

Highlighted
Community Support
Community Support

Re: Importing Excel to Sharepoint with PowerApps function

Hi @tbenge05 ,

Based on your description, you could refer this:

1)format your data of Excel to a table

   create columns in sharepoint list 

2)connect with your Excel file and sharepoint list

3)save your data of Excel to collection

Collect(collection1,tablename)  

4)format your collection data

Collect(collection2,RenameColumns(
ShowColumns(collection1,"field1","field2","field3"),
"field1","field11","field2","field22","field3","field33"))
//if you only want to update 3 fields of sharepoint list, you could use ShowColumns to reduce the number of fields
if the fields name in excel and sharepoint list are different, you could use RenameColumns to change the fields' name(to make them the same as those in sharepoint list)

5)update your sharepoint list with this collection

Collect(listname,collection2)

Here are docs about the functions that I use for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-clear-collect-clearc...

 

What's more, if your record number is larger than 2000, you will meet delegation problem.

Then your data can not updated successfully.

Please change this limit to 2000.delegation.jpg

Then, modify your fucntions.

Here's a doc about delegation for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
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

Highlighted
Helper III
Helper III

Re: Importing Excel to Sharepoint with PowerApps function

Hello @manuelstgomes , 

 

I am looking for the same requirements and according to your solution , I would really appreciate if you can give the below details : 

 

1. Trigger the Flow in the PowerApp that fetches the data from the database, 

What if the User is Uploading an excel file from his machine ? Where would Powerapp Fetch the data. is it possible to have a windows Pop up to select the file and upload it ? 

2. Flow gets the data and replicates it into the SharePoint

Do you have an idea which flow exactly ? 

3. Update/store the rows added so that, next time you run the PowerApp you don't re-import them.

 

Thank you for your help. 

 

Najwa. 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (10,829)