Showing results for 
Search instead for 
Did you mean: 
Kudo Kingpin
Kudo Kingpin

how to export data from powerapps to excel(by user)

how to export data from powerapps to excel(by user), I know there is CDM table export but I do not want user to see entire CDM table.

I need a functionality in powerapps that exports current screen set data to excel, pdf, word etc.


Actually there may be an easier way of sending the data as a csv attachment if you have Office 365 Outlook.


The answer is buried here:


You will see that you need to supply the attachments as a table, namely:

  • Attachment (optional): Send an attachment. Attachment properties include Name (required), and ContentBytes (required).

I think this means that you create your CSV data with the Concat function as the content bytes.  This needs some experimentation, but you could create a collection with the filename and the content bytes (your csv data) then try to use the collection as the parameter of the send email function.


Please let me know how you get on.  I would try this myself but have no time today.

I have now had time to experiment and I got the CSV file creation to work.


This is how I did it:

  1. Create a flow to do the following sequence:
    a) create a file in SharePoint library (files with the same name will be overwritten)
    b) fetch the content of the file
    c) send the content of the file by email as an attachment
  2. In the app, create a button to call the flow, where the file content is the csv text created by the Concat function

There might be a better way to do it but it works.  Screenshots follow. Please note that the filename parameter in the last screenshot was left over from a previous version of the flow.






Are you pulling data from powerapps screen into csv via flow? Please let me know.

No, the csv file content can be created by a Concat function in PowerApps with your data.

Say your data is source is MyDataSource and you filter it, then you can do this to create a csv file for example:

Concat( Filter( MyDataSource, MyColumnA = "MyFilterValue"), MyColumnB & ", " & MyColumnC & Char(10))

Please let me know if this is not clear.

You can add column titles at the start etc. once you understand how it works.

I do not see an option to call flow in powerapps button-


You can only add flows when you edit apps in PowerApps studio, it is the main difference between the web editor and the studio.

Please see point 6 of the following...

I was able to make it work!!! thanks!


Now I also need to send first row as all columns( how to do this?)

I was able to get filtered search result in csv to ondrive but I need to add first row as columns.

Well done!

I think the easiest approach is just to add a piece of text at the beginning, before the concat function, with the column names, something like this:

"Column A, Column B, Column C, Column D"&Char(10)&Concat(etc. etc. ...

thanks that worked!

Now I also want to send this file as attachment to a user. File is getting created on one drive for business.

I am getting below error-


Unable to process template language expressions in action 'Send_an_email' inputs at line '1' and column '1509': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_office365']['connectionId']' cannot be evaluated because property 'shared_office365' doesn't exist, available properties are 'shared_onedriveforbusiness'. Please see for usage details.'.



another query- 


I want contains filter instead of 

MyColumnA = "MyFilterValue"

How do I do that. I may also need multiple and or afterwards. 

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,961)