How to create PowerApps collection from Excel

In this Power Apps Tutorial, We will discuss how to create Powerapps collection from an Excel Sheet.

You can also check my previous articles on how to Add, Update, Remove and Filter items from PowerApps collection and also how to create a collection in Power Apps from the SharePoint Online list.

Create PowerApps collection from Excel

To create PowerApps Collections from an Excel sheet, We need to follow these below processes as:

  • Create an Excel file, Add some records and format that Excel file as Table
  • Rename the Excel Table Name
  • Create a Canvas app in Power Apps
  • Connect a new or existing Data Source and Import from Excel to your App
  • Add a Button and Apply the Collection formula for Excel Sheet
  • Preview the Canvas app in the Power Apps
  • Excel Records added into the Power Apps Collections

Create PowerApps Collection from Excel Sheet – Syntax

Below is the syntax to Create Collection from Excel in PowerApps.

Collect(MyExcelCollection, ExcelSheetName)

Where,

  • Collect = Collection Function Name which is used to create Powerapps Collections
  • MyExcelCollection = Collection Name
  • ExcelSheetName= Provide the Excel Table Name which contains records that you wants to display in the Powerapps Collections

Create Excel, Add Records, and Format Excel as Table

Follow the below steps:

  • Create an Excel file using some sample records as below.
  • Open the Excel file, go to the Home tab. Click on Format as Table option and select any table format.
How to create PowerApps collection from excel
  • Change your Excel Table name (Select Table -> Go to Design tab -> Rename Table Name) as Corona_Details and Save it as like the below screenshot.
How to create PowerApps collection from excel sheet

Create a Canvas app in Power App

  • Sign in the PowerApps app with your credentials.
  • Go to Apps option from the left navigation.
  • Select Canvas under the + New app tab from the top of the page.
How to create Power Apps collection from excel sheet
  • Select Tablet layout under the Blank app section as shown below.
How to create Power Apps collection from excel

Connect a Data Source and Import From Excel to your App

Click on to connect to data from the middle of the page and expand the Connectors (from left navigation). Select the new Data Source as Import from Excel as shown below.

Create PowerApps collection from excel

Upload the Excel file from Desktop or your destination path. Choose the Excel table by name (Corona_Details) and click on the Connect button.

Create PowerApps Collection from SharePoint Excel

Add a Button and Apply the Excel Collection formula

Here, we will add a button into an Power Apps App and on click of that, we will populate the PowerApps collection.

In the Power apps Screen, add a Button (Click Insert -> Button).

Create Power Apps Collection from SharePoint Excel

Double click on the button and just rename the Button name to Add Excel Records to Collection.

Also, you can provide some button properties like Color, Border, Font, Font size etc.

Create Power Apps Collection from SharePoint Excel Sheet

Select the Button and apply the below formula in its OnSelect Property to this function.

OnSelect = Collect(ExcelItemColection,Corona_Details)

Where,

  • OnSelect = Button Property Name
  • Collect = Collection Function Name
  • ExcelItemCollection = Collection Name
  • Corona_Details = Excel Table Name
Create PowerApps Collection from SharePoint Excel Sheet

Preview the App in the PowerApps

Now preview the app to see how it works. To preview, click on F5 or Preview icon from right top of the page.

Create Power Apps Collection from a SharePoint Excel Sheet

In the Preview screen, the Button will appear as the below screenshot. Just click on this button.

There will be no effect when you will click on the button, but all the Excel records will be added into the Powerapps Collections.

Create PowerApps Collection from a SharePoint Excel Sheet

Excel Records added into the Power Apps Collections

To view all the Excel Records in the Powerapps Collections, Go to View tab -> Collections as shown below.

Create PowerApps Collection from a SharePoint Excel

Click on your Collection Name (ExcelItemCollection) and then you can view the first 5 records in the Powerapps Collection.

Create Power Apps Collection from a SharePoint Excel

Also, you may like some below Powerapps Tutorials:

In this PowerApps tutorial, We discussed how to create Powerapps collection from an Excel Sheet.

>