Power Apps Export Import Control – How to use

In this Power Apps Tutorial, We will discuss what is the Export and Import Control in PowerApps. Also, by taking a simple scenario, We will see how to work with the PowerApps export and import control.

In this article, We will cover all the below topics:

  • What is Export Import Control in PowerApps
  • What are the key properties in PowerApps Export Import control
  • Limitations in PowerApps Export Import Control
  • How to add Export and Import control in PowerApps
  • Power Apps Export Import Example

Export Import Control in PowerApps

  • Apart from the Power Apps Export Import Package, in the app, there are two such types of controls available that you can use inside your app known as PowerApps Export Control and PowerApps Import Control.
  • PowerApps Export Control helps to export the data to a local file and PowerApps Import Control helps to import the same data into another app in PowerApps.
  • The most important thing you should know is, When you are exporting data, you will create a compressed file that you can copy to another machine, but you can not read it in any program other than Power Apps.
  • Suppose you want to create more than one app where you can use the same data but not share that data outside those apps, that you can export it and import it by using the PowerApps Export control and an Import control.

PowerApps Export Import Control Properties

Below represents some of the important key properties of the PowerApps Export Import Control:

  1. Data = Specify the collection name that you want to export to a local file. This Data property is only present in Export control but not in Import control.
  2. OnSelect = It defines the actions to perform when the user taps or clicks a control.
  3. Color = It provides the color of text in a control.
  4. DisplayMode = It specifies whether the control allows user input (Edit), only displays data (View), or is disabled (Disabled).
  5. Fill = It represents the background color of a control.
  6. HoverBorderColor = When the user keeps the mouse pointer on that control, It specifies the color of a control’s border.
  7. HoverColor = When the user keeps the mouse pointer on it, this provides the color of the text in a control.
  8. RadiusBottomLeft = It specifies the degree to which the bottom-left corner of a control is rounded.
  9. RadiusBottomRight = It defines the degree to which the bottom-right corner of a control is rounded.
  10. RadiusTopLeft = It defines the degree to which the top-left corner of a control is rounded.
  11. RadiusTopRight = It defines the degree to which the top-right corner of a control is rounded.
  12. Size = It specifies the font size of the text that appears on a control.
  13. Text = It specifies the text that appears on control or that the user types into a control.
  14. Visible = It defines whether a control appears or is hidden.

Limitations in PowerApps Export Import Control

There is only one limitation of the PowerApps Export Import Control i.e. The export functionality can not support in web browsers.

Read Power Apps PDF Viewer Control

Add Export and Import control in PowerApps

  • The next thing comes to how users can insert the Export and Import control in the app. To add the export and import control in PowerApps, go to Insert tab -> Click on Media -> Select Import or Export that you want as per your need.
  • When you will add the Import or Export control to the screen, you can see those controls will appear as like Power Apps Button control. Although it behaves as like button input. Refer to the below screenshot.
Add Export and Import control in PowerApps
Export and Import control in PowerApps

Power Apps Export Import Example

Now by taking a simple scenario, We will see how we can use this Export and Import control in PowerApps. Check out these below simple steps.

Step – 1:

  • At first, create a Canvas app with a Tablet layout. On the screen, insert a Button control and set its Text property to Collect Data. We will create a PowerApps collection when a user will click on the button.
  • Select the button input and apply the below formula on its OnSelect property as:
OnSelect = ClearCollect(
    Books,
    {
        BookName: "PowerApps",
        Price: "25.09"
    },
    {
        BookName: "Power BI",
        Price: "20.50"
    },
    {
        BookName: "Power Automate",
        Price: "30.28"
    }
)

Where,

  1. Books = Collection name
  2. BookName, Price = Headers of the collection
  3. PowerApps“, “Power BI“, “Power Automate” = These are the values of the book name field
  4. 25.09“, “20.50“, “30.28” = These are the book price values
Power Apps Export Import Example
Power Apps Export Import Example
  • Save and Preview (F5) the app. Then tap on the Collect Data button. Once you will click on the button, then the Book collection will create. You can view it by using Collections (View -> Collections).

Step – 2:

  • Next, insert an Export control and set its Data property to the specific collection name i.e.
Data = Books
PowerApps Export Import control
Power Apps Export ImportControl Example
  • Now again save and preview the app. Tap on the Export Data control. When you click on that control, it will ask to download the file as Books.zip“.
  • Save the Zip file somewhere in your local system and then press Esc to return to the default workspace.
Power Apps Export Import control
PowerApps Export Import Example

Step – 3:

  • In this step, Insert the Import control and rename it to BookImportData. Select the Import control and apply the below code on its OnSelect property as:
OnSelect = Collect(
    ImportedBooks,
    BookImportData.Data
)

Where,

  1. ImportedBooks = New collection name that will create when the user will tap on the import control
  2. BookImportData = Import Data control name
Power Apps Export Import control example
PowerApps Export Import control

Step – 4:

  • Save and Preview the app. Select the Import Data control. Once you will select it, it will ask you to select the file that you exported, and then select Open as shown below.
PowerApps Export Import examples
  • At last, Press Esc and select File menu and then click on Collections, and confirm that the current app has the data that you exported as like the below screenshot.
Power Apps Export Import examples
PowerApps Export control

This is how we can use export and import control in PowerApps.

Also, you may like these below PowerApps Tutorials:

In this Power Apps Tutorial, We discussed what is the Export and Import Control in PowerApps. Also, by taking a simple scenario, We saw how to work with the PowerApps export and import control.

Also, We covered these many below topics:

  • What is Export Import Control in PowerApps
  • What are the key properties in PowerApps Export Import control
  • Limitations in PowerApps Export Import Control
  • How to add Export and Import control in PowerApps
  • Power Apps Export Import Example
>