Import And Export Data In Microsoft PowerApps

Before reading this article, please go through some important articles given below.

In PowerApps, we can add import and export control.

Import and Export Control

Import and export controls are used to export the data to a local file and then import that data into another app in PowerApps. If you want to use same data in more than one app, we can use export and import, using an export control and an import control.

When you export data, you create a compressed file, which you can copy to another machine, but you can't read it in any program other than PowerApps.

Follow the steps, mentioned below, to work with import and export control in PowerApps.

Step 1

Log into the PowerApps

After downloading PowerApps from Window store, we need Microsoft related organization’s Office 365 ID or (MSDN, Microsoft, Skype, Office 365 etc.,) to login with it.

PowerApps

Step 2
 
Create a New App in PowerApp

After login, we can see Dashboard. We need to click on New button.

PowerApps

Step 3

Choose Blank app.

PowerApps

Step 4
 
Designing the App

Now, let's start designing the app. On the left side, we can see the Individual Screens to add our data. On the right side, we see the list of layouts. On the top, we see the formula bar.

On the right side, we see the Add datasource to add the external datasource.

PowerApps

Step 5
 
Drag and Drop the Button Control
  1. Go to the Insert menu, followed by controlling and dragging the button tool.
    PowerApps

  2. Drop the Button tool on the Screen.

    PowerApps

  3. Add the Coding
    Select the button and add the data for the button to the OnSelect event.

    ClearCollect(Product, {Name:"Soap", Price:"30"}, {Name:"Powder", Price:"20"}, {Name:"Cream", Price:"50"})

    PowerApps

Step 6

Drag and Drop the Export Control Tool

If you select the options, then we can export the data.
  1. Go to the Insert menu, followed by choosing controls and drag the export control.

    PowerApps

  2. Drop the export control to the screen.

    PowerApps

  3. Add coding.

    Select the export control and set the data event to product..

    PowerApps

Step 7

Drag and Drop the Import Control Tool

If you select the options, then we can export the data.
  1. Go to the Insert menu, choose controls and drag the import control.

    PowerApps

  2. Drop the import control to the screen.

    PowerApps

  3. Rename the control.

    PowerApps

  4. Add Coding
    Select the import control and add the coding to the OnSelect event.

    Coding
    Collect(ImportedProduct, MyData.Data)

    PowerApps

Step 8

Run the app.

PowerApps

Output 1

Main screen is shown below.

PowerApps

Output 2

Click on the export control.

PowerApps

Output 3

Choose the folder to export and click save button.

PowerApps

Output 4

Click on the import control.

PowerApps

Output 5

Choose the folder, where the file is required to be import and click Open.

PowerApps
Conclusion

I hope, you understood how to add import and export control in Microsoft PowerApps and how to run it.


Similar Articles