
Hi everyone,
Initially for a registration screen which had 4 sections like Personal Details, Projects , Skills (3 sub-types: Primary Skill, Secondary Skill, Soft Skill) , Certifications. So to do this I had created different lists (for Personal details I am making use of Office 365 connector to fetch the required details: First Name, Last Name, Email, Phone) and then using the forms I am getting the user inputs with the help pf forms, this was working as expected. (For more details you can check the following : Query )
Just to make things simpler I had a requirement wherein a button will be provided where the user can upload a file (mostly excel file) which will be have a defined template (that I have already fixed with the necessary columns and converted it into a table), for which I have created a flow wherein at start I am uploading the file from user's local system to a SharePoint Document library, then using the same file I am trying to extract the contents and send it back to Power Apps. The response (JSON) will be stored in a collection which I am showcasing in a gallery just to check if the data is retrieved properly or not.
The flow looks like:
(In the first two steps I am uploading the file to a SharePoint document library named DocumentUploads)
Once the file is uploaded, I want to make use of the same file to retrieve its content for which I am using:
Finally using HTTP response action, I am retrieving the data set in the variable in a particular schema (JSON format which is related to my dataset)
A sample file: (Data to be uploaded to SP will look like this)
In Power Apps: (I have added an Attachments control to upload files and a button which triggers the above flow with the expression)
ClearCollect(excel_Import,
storeFileSPImport.Run(
{
file: {
contentBytes: First(SampleFile.Attachments).Value,
name: First(SampleFile.Attachments).Name
}
}
)
)Here the excel_Import is the name of the collection in which I want to retrieved data from the file and 'sampleFile' is the name of the Attachment control.
So when I tried to execute it, I got the following:
If anyone has any idea about Importing data from a file into Power Apps, please do let me know and if I am missing anything.
Regards,
Sidhant.