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.


I am using ask in a powerapp and trigerring it in web, file is getting created but not sendemail after that.flowcalling3.png

I still think the issue is with your Attachments Name parameter.  I am not sure what DisplayName is, I do not see that option in my flow...

you are right!

I tried sample test without any attachment and its failing with same message-


  • Code
  • Message
    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.'.

Do you want me to recreate the steps?

Community Champion
Community Champion

Hi, just a quick note to say that I have been experimenting and it serms that we can skip the file creation step and possibly even skip using Flow altogether.
Will write more when I have tested the solution.

thanks! What I am looking for is directly sending email to current user with search filter result in csv without having to put additional complexity of flow and one drive.

OK, did it!

Basically I have got rid of One Drive, but we still need Flow.  That is not a major problem since Flow seems to work really well.

I have also discovered a bug that I have reported in a separate post, so it requires a hack.


Try this:

  1. Create a flow exactly like the below screenshot.  Please note that the Attachments Content is Sendanemail_BCC, this is because there is a bug and for some reason the parameter for attachment content is not elaborated in the initial step.
    The way you hack this is exactly as follows: when you create the flow, place the cursor in the bcc box and select "Ask in PowerApps", and that creates the parameter.  You then remove the parameter from the bcc box and select it in the Attachments Content box.  Please let me know if this is not clear.
  2. Create a button in PowerApps and set its OnSelect property as in the second screenshot (the order of parameters may change depending on the order in which you created them in Flow).




thanks for this workaround. Please keep me posted when the bug is fixed.

another big issue-


Now I have 100k records and I added a filter with created by as me. Now when I export it only exports 500 records but with my username it has 40k records created by my. I need this 40k records exported in csv and send it via email. This is very important and I need good performance.

Hi, this is an issue.  I have contributed to many posts in relation to the 500 item limit.

There is no easy way around this in PowerApps.


Then you could try an alternative approach.  In Flow you can get all the records of your CDS entity and then create the email attachment with string functions in Flow using the For Each loop etc.  However I don't know if this item limit also applies to Flow.


This is just an initial idea, sorry I can't be of more help.


Hopefully sometime soon we will have strored procedures in CDS and then it could be easier.

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 (2,781)