cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tbenge05
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

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

5 REPLIES 5
manuelstgomes
Super User II
Super User II

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

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

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

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. 

Hi,

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,366)