Export data to CSV in Power Apps (using Power Automate)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone my name is vipul Jain and today in this video I am going to show you that how you can export your data to a CSV file in powerapps so I will be leveraging both powerapps and power automate to export the data to a CSV file so in this video I will be using powerapps a simple button in powerapps and on click of that button I will be calling the power automate okay and finally saving the file in a OneDrive so let's see this in action so I am in the powerapps environment you can see the same project which we are using for this powerapps crash Core Series and I've created a separate screen to showcase the demo that how you can export your data to a CSV file so first of all what I'm going to do is I'm going to add a button simple I'm going to add a button on this screen and I will change the text of this button to let's say export to CSV all right so on the click of this button what we will do that we will call the power automate flow and we will save the file in OneDrive okay so the first and foremost thing as usual you have to make a connection with your data source and for this particular video I will be using a static data a static Excel file which is saved in my local system so let's make a connection first of all to our data source so go to add data click on add data and search for import here you can see import from Excel so I want to import the data which is there in my local system I want to add the data which is there in a manufacturer's table so there are two tables in my axle or two sheets in my Excel basically devices and manufacturers so I'm going to click on connect so it will make a connection to the data source so before moving to the power automate and create the flow I want to showcase you the data which is there which is the static data in the Excel so its manufacturer title logo headquarter store and so on so this is the data which with which I have made a connection in my powerapps so on the click of this button I want to call the power automate okay so basically we will call the power automate on the click of this button for this we have to create the power automate now in the from the powerapps studio itself so let's do it so on the left hand side you see there is option called Power automate click on that and you can click on the add flow create new flow so the moment you click on create new flow a screen will open which will allow you to create a blank flow or from the predefined some predefined templates so I click on create from blank the moment you create your flow from the plan a powerapps trigger has already been added for your flow okay let's rename this flow very quickly so I say export to CSV so this is the just the title or the name of the flow which I have created now add a new step and first of all I would take the input I would take the input from the powerapps so for that I am using a data operation you can you also use a data operation of the type compose okay and here input will be ask in powerapps so basically what I'm doing is powerapps is the trigger this is the by default trigger because we are creating the power automate flow from within the powerapps now what I have added a data operation of the type compose and input is whatever data which will be coming in the Json format because power automatically is remember only understand the Json format type of data so whatever Json format data will be coming to the power automate from the powerapps this is my input data so I can rename this function as maybe rename this action probably from compose to let's say content okay so this is the data operation which I've added now I am going to add a new step to create the CSV table so basically what you can do is you can add action which is create CSV table now from where you want to create the CSV table so basically we have to create the table and then finally we will export that data to a OneDrive location okay so create CSV table here I can go to the expression and here I can use the formula or the function Json okay and here what you can do is that what you have to take as a dynamic content the output from the previous action so I say Json output Contents I click on OK so here I will repeat again this is the trigger this is the data operation for taking the input from the powerapps and here I am creating the table in a Json format from the input which I have received from the powerapps and finally what you have to do is you have to add another action to create a file create file in OneDrive so there is action which is called create file for OneDrive for business please remember I am using OneDrive for business I click on create file now this is my OneDrive location and the folder is powerapps where I want to create the file in OneDrive location so folder path I will go to select the root and in the root I in the root uh in the root folder I am going to choose the folder where I want to create the data so that is powerapps so powerapps is the folder location in OneDrive where I want to create the file now file name file name simply I want to create different files based on the date time stamp and something like that so I can use the Expression UTC now and I click on OK and UTC now that is the dot CSV extension which I am adding simply okay and for the file content what will be the file content which will be the output of your previous step so output of the previous step which is create CSV table so that's all your flow has been created now you can click on saving the flow so click on Save now you see the flow is getting saved and now I have been returned back to the powerapps location or powerapps screen now what will happen now export to CSV has been added to my powerapps studio now basically the last step what you have to do is that on the click of this button we want to call the power automate which we have created right so on the on Select Property of this button what you can do is so you can say export to CSV dot run so export to dot export to CSV is your name of the power automate dot run will allow you to call the power automate flow from the click of the button now we have to pass the data in the Json format so I am using a function Json and Json will ask you that what data you want to pass so my data is in the manufacturer's data source which I have used and I have made a connection to the manufacturers now do you want to include the binary data so for that you have to specify the format also so Json format dot include binary data so you can say that yes hey include the binary data while passing the data from powerapps to the power automate so that's it uh you have created the powerapps you have created the Power automate flow and on the click of the button what will happen that whatever data is there in the manufacturer Excel the data source that will be converted to CSV and will be saved in the OneDrive location so let's see this in action so I'm running the app now I click on export dot export to CSV button and you see here if I navigate to the OneDrive location just refresh the screen you will see a new file will be created here as a CSV file so your data has been exported the manufacturer's list or the manufacturer data if I click on this CSV file which has been generated using powerapps and power automate flow so you will see you can find the complete data headquarter logo manufacturer ID store and title all the columns and data has been exported very correctly to the CSV file so that's all for this video keep watching keep commenting on my videos thank you
Info
Channel: Vipul Jain
Views: 2,625
Rating: undefined out of 5
Keywords: sharepointonline, powerplatform, Power Apps, powerapps, exporttoexcel, exporttocsv
Id: mFVcY3YgQR8
Channel Id: undefined
Length: 8min 48sec (528 seconds)
Published: Mon Feb 13 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.