cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

Is it posible to send a collection as an excel or csv to email via powerapps?

Hi, 

 

I have a collection for daily sales but I want to receive the list of the sales related to date I am selecting from the date picker via email

 

can that be done?

 

Osmand

7 REPLIES 7
leyburn19
Level 10

Re: Is it posible to send a collection as an excel or csv to email via powerapps?

It can be done with a flow.

 

Put your Collection into a HTML.Text as define  table  (example below) ,   then pass that with a flow.  Put the HTML table into the body of an email and you will be able to Copy and paste into excel when you receive it.

 

If the data in the collection matches data in a SP list or similar you can run a flow that does a Get Items,  Adds each row to an excel file - Must be one drive and must already hay an empty table to add the rows.  Then you use one drive Get File Contents and put it as an attachment to the email

 

"</table> <p></p>"

&

"
<p> <span style='font-weight:bold'></span></p>
<table border='1' style='width:100%'>
<tr>
<th style='width:10%; padding-left:1em; padding-right:1em; white-space: nowrap'>Store</th>
<th style='width:10%; padding-left:1em; padding-right:1em; white-space: nowrap'>Position</th>
<th style='width:10%; padding-left:1em; padding-right:1em; white-space: nowrap'>Surname</th>
<th style='width:20%; padding-left:1em; padding-right:1em; white-space: nowrap'>First</th>
<th style='width:10%; padding-center:1em; padding-right:1em; white-space: nowrap'>Phone</th>
<th style='width:10%; padding-center:1em; padding-right:1em; white-space: nowrap'>Mobile</th>
<th style='width:10%; padding-center:1em; padding-right:1em; white-space: nowrap'>Defence Email</th>
<th style='width:10%; padding-left:1em; padding-right:1em; white-space: nowrap'>BRS Email</th>

</tr>"

&

Concat(Sort(Filter(staff,POC="yes" ),Site,Ascending), "<tr>
<td style='text-align:left; padding-left:1em; padding-right:1em; white-space: nowrap'>"& Site &"</td>
<td style='text-align:left; padding-left:1em; padding-right:1em; white-space: nowrap'>"& Position &"</td>
<td style='text-align:left; padding-left:1em; padding-right:1em; white-space: nowrap'>"& Surname &"</td>
<td style='text-align:left; padding-left:1em; padding-right:1em; white-space: wrap'>"& Given &"</td>
<td style='text-align:left; padding-left:1em; padding-right:1em; white-space: wrap'>"& Phone &"</td>
<td style='text-align:left; padding-left:1em; padding-right:1em; white-space: wrap'>"& Mobile &"</td>
<td style='text-align:left; padding-left:1em; padding-right:1em; white-space: nowrap'>"& DefenceEmail &"</td>
<td style='text-align:left; padding-left:1em; padding-right:1em; white-space: nowrap'>"& BRSEmail &"</td>

</tr>
")

&

"</table>"



 

Community Support Team
Community Support Team

Re: Is it posible to send a collection as an excel or csv to email via powerapps?

Hi @OsmandFernando ,

 

Please check on below thread which has the similar scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Email-a-collection/td-p/31517

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Re: Is it posible to send a collection as an excel or csv to email via powerapps?

Thank you but little bit complicated for me to understand all the steps

 

I will try my best to study on tat thread

 

Osmand

Re: Is it posible to send a collection as an excel or csv to email via powerapps?

Thank you for your reply. There must be an easy way i guess

 

Osmand

Community Support Team
Community Support Team

Re: Is it posible to send a collection as an excel or csv to email via powerapps?

Hi @OsmandFernando ,

 

So far that is the only way to send a collection to email in PowerApps. The easy way might be convert your collection to text instead. But I suspect that that's not want you want to receive in the email. 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Re: Is it posible to send a collection as an excel or csv to email via powerapps?

@v-monli-msft  is there anyway I can do with out trying through a collection?

 

What I want is, 

 

I have a List named SalesTable. I want to receive an email for Today's sales when I am pressing a button. The email should have an excel or csv file with Today's sales data

 

Osmand

Community Support Team
Community Support Team

Re: Is it posible to send a collection as an excel or csv to email via powerapps?

Hi @OsmandFernando ,

 

Please check on below thread which has a similar scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/how-to-export-data-from-powerapps-t...

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,269)