I have successfully set up an Export control to save the contents of a collection to a file. However, I am unable to work out the correct way of configuring an Import control to get this data back into a collection which can be used in the app.
My control is called impImportData and I have tried using the following code in the OnSelect property of the Import control itself and a separate button:
ClearCollect(colImportedData,impImportData.Data)
Whatever I try, I just get the error 'Invalid argument type' with the predominant red squiggle under the .Data part of the code. I have tried using impImportData.Data as a source for a DataTable but it complains that it is not being passed a Table. It seems therefore that the data is not being imported as a Table.
I have looked at the documentation for these controls but it isn't very detailed. I don't believe I have done anything that different to the example given. https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-export-import
Has anybody been able to get this working successfully in their own apps? Any pointers would be appreciated.