Export and Import controls in Power Apps
Controls for exporting data to a local file and then importing that data into another app in Power Apps.
Description
If you want to create more than one app that uses the same data but not share that data outside those apps, you can export it and import it by using an Export control and an Import control. When you export data, you create a compressed file that you can copy to another machine, but you can't read it in any program other than Power Apps.
Warning
Enabling this functionality in your app may expose it to security vulnerabilities and data leakage. It is recommended to advise users to import only recognized and trusted files and only export data that is not confidential or sensitive.
Limitations
The export functionality isn't supported in web browsers.
Key properties
Data – The name of a collection that you want to export to a local file.
- The Data property is available for an Export control but not an Import control.
OnSelect – Actions to perform when the user taps or clicks a control.
Additional properties
Align – The location of text in relation to the horizontal center of its control.
BorderColor – The color of a control's border.
BorderStyle – Whether a control's border is Solid, Dashed, Dotted, or None.
BorderThickness – The thickness of a control's border.
Color – The color of text in a control.
DisplayMode – Whether the control allows user input (Edit), only displays data (View), or is disabled (Disabled).
DisabledBorderColor – The color of a control's border if the control's DisplayMode property is set to Disabled.
DisabledColor – The color of text in a control if its DisplayMode property is set to Disabled.
DisabledFill – The background color of a control if its DisplayMode property is set to Disabled.
Fill – The background color of a control.
FocusedBorderColor – The color of a control's border when the control is focused.
FocusedBorderThickness – The thickness of a control's border when the control is focused.
Font – The name of the family of fonts in which text appears.
FontWeight – The weight of the text in a control: Bold, Semibold, Normal, or Lighter.
Height – The distance between a control's top and bottom edges.
HoverBorderColor – The color of a control's border when the user keeps the mouse pointer on that control.
HoverColor – The color of the text in a control when the user keeps the mouse pointer on it.
HoverFill – The background color of a control when the user keeps the mouse pointer on it.
Italic – Whether the text in a control is italic.
Padding – The distance between the text on an import or export button and the edges of that button.
PressedBorderColor – The color of a control's border when the user taps or clicks that control.
PressedColor – The color of text in a control when the user taps or clicks that control.
PressedFill – The background color of a control when the user taps or clicks that control.
RadiusBottomLeft – The degree to which the bottom-left corner of a control is rounded.
RadiusBottomRight – The degree to which the bottom-right corner of a control is rounded.
RadiusTopLeft – The degree to which the top-left corner of a control is rounded.
RadiusTopRight – The degree to which the top-right corner of a control is rounded.
Size – The font size of the text that appears on a control.
Strikethrough – Whether a line appears through the text that appears on a control.
TabIndex – Keyboard navigation order in relation to other controls.
Text – Text that appears on a control or that the user types into a control.
Underline – Whether a line appears under the text that appears on a control.
VerticalAlign – The location of text on a control in relation to the vertical center of that control.
Visible – Whether a control appears or is hidden.
Width – The distance between a control's left and right edges.
X – The distance between the left edge of a control and the left edge of its parent container (screen if no parent container).
Y – The distance between the top edge of a control and the top edge of the parent container (screen if no parent container).
Example
- Add a Button control, and set its OnSelect property to this formula:
For more details, read adding, naming, and configuring a control, ClearCollect and other functions.ClearCollect(Products, {Name:"Europa", Price:"10.99"}, {Name:"Ganymede", Price:"12.49"}, {Name:"Callisto", Price:"11.79"})
- Press F5 and select Button control, and then press Esc.
- Add an Export control, and set its Data property to Products.
- Press F5 and select the Export control to download the file Data.zip.
- Select Save, then press Esc to return to the default workspace.
- In a new or existing app, add an Import control, name it MyData, and set its OnSelect property to this formula:
Collect(ImportedProducts, MyData.Data) - Press F5 and select MyData, then select the file that you exported, and then select Open.
- Press Esc and select Collections on the File menu, and confirm that the current app has the data that you exported.
Accessibility guidelines
The same guidelines for Button apply because Export and Import are just specialized buttons.