Hello there,
I wanted to convert html to csv file and send CSV file in email. I have used "HTML Doc from Template" node and "Convert HTML to CSV" node. My CSV file has generated at backend folders but HTML file is going in email. How Can i send a CSV file in email?
Please suggest.
Thanks
Discussion posts and replies are publicly visible
A CSV file would be a good candidate for being attached to the email. Did you try that?
Hi Stefen,
I want to pass a CSV doc only but HTMl is sending in a email.
Hello @stefanCan you please look into this?
<HTML> <BODY>
<table>
<tr> <td> <label> <b> Security </b> </label> </td>
<td> <label> <b> Settlement_Date </b> </label> </td>
<td> <label> <b> Side </b> </label> </td>
<td> <label> <b> Quantity </b> </label> </td>
<td> <label> <b> Trade Currency </b> </label> </td>
<td> <label> <b> Account </b> </label></td>
<td> <label> <b> Model Portfolio </b> </label> </td>
<td> <label> <b> RefCode9 </b> </label></td> </tr> <tr> <td>###col1###</td> <td>###col2###</td> <td>###col3###</td> <td>###col4###</td> <td>###col5###</td> <td>###col6###</td> <td>###col7###</td> <td>###col8###</td> </tr>
</table>
</BODY> </HTML>This is my html template. I need to use foreach in this template. Can we use foreach for this row?<tr><td>###col1###</td><td>###col2###</td><td>###col3###</td><td>###col4###</td><td>###col5###</td><td>###col6###</td><td>###col7###</td><td>###col8###</td></tr>Thanks
Without knowing what you actually want to achieve, this is so confusing !?!?!?!?
If you want to use a placeholder for the body of a HTML grid, you should exactly do that.
<table> ###table_body### </table>
and then use some code like this to generate the content
joinarray( a!forEach( items: enumerate(3), expression: concat( "<tr>", "<td>col1-",fv!index,"</td>", "<td>col2-",fv!index,"</td>", "<td>col3-",fv!index,"</td>", "<td>col4-",fv!index,"</td>", "<td>col5-",fv!index,"</td>", "</tr>" ) ), char(10) )
I want to use loop for this row only..<tr><td>###col1###</td><td>###col2###</td><td>###col3###</td><td>###col4###</td><td>###col5###</td><td>###col6###</td><td>###col7###</td><td>###col8###</td></tr>
This is something like when HTML convert to CSV only one row is showing up(it's picking up only one row from database). But we have have multiple row in database. I want to use foreach for the same.
Well ... you really lost me ... HTML, CSV, email, one row vs. multiple .... what is the purpose of all of this ?!?!?!?
Requirement is CSV file should send in the email attachment.I have created a HTML template and convert it into CSV.Now, the issue is: When csv file is generated all data is coming in one row in concating form.I want to split that data in each single row. This is happening because of this <tr><td>###col1###</td><td>###col2###</td><td>###col3###</td><td>###col4###</td><td>###col5###</td><td>###col6###</td><td>###col7###</td><td>###col8###</td></tr>
So I want to use foreach.
Is there any other way I can export data to csv?
And is there any specific reason you do not want to use the solution I posted above?
https://docs.appian.com/suite/help/23.3/Export_To_CSV_Smart_Service.html
I am trying to use the method posted above. I will let you know when done.
Hi
I am looking the above mentioned code.. When I use this code it shown up as same. I am using Node "HTML from doc template"
after that I am converting it into pdf which is successfully converted.
The issue is with multiple rows not showing up. Just wanted to know how to use above code in HTML?
This is a table I am using:
<table style="border:2px solid black" width="100%" border="1" cellpadding="5" cellspacing="0"><tr> <td><label> <b> comments</b> </label> </td> <td><label> <b> createdDate </b> </label> </td> <td><label> <b> createdBy </b> </label></td> </tr> <tr> <td> ###comments### </td> <td> ###createdDate### </td> <td> ###createdBy### </td> </tr> </table>
basically I want to repeat this row. because this row has multiple entries.<tr><td> ###comments### </td><td> ###createdDate### </td><td> ###createdBy### </td></tr>
You can check the screenshot:
I already tried to explain a solution to this earlier: community.appian.com/.../120894
Yes, you already explained. But as I send you screenshot- how can I use fv!index in html?like I have pv!eventdetiails.comment_txt that using in parameter ###comments###How can I use fv!index?
This is so confusing!?!?!
You can't use fv!index in HTML! You need to write an expression in Appian that turns your actual data into a HTML formatted text. This text represents the HTML table. Then call this expression to replace a single placeholder like I described.
It worked. Thanku so much. I was confused in a single placeholder thing..