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.
I am not sure I fully understand your issue. Please elaborate.
I am trying to send a CSV file in a email. I have HTML template and am converting it into csv by using smart service "Convert HTML to CSV". But in email instead of sending CSV file HTML file is passing.
What exactly do you mean with "But in email instead of sending CSV file HTML file is passing."?
I mean, a document that you attach to an email is just an attachment. And when you attach the CSV, then I do not understand where any HTML should come from !?!?!?
I am using two nodes..1. HTml doc from template2. Convert HTML to CSVBoth HTML and CSV file saved in folder but in email only html file is going. CSV file is not going in email
Well, it is you who configures the node to send the email. I am not sure how I can help you here? You have to make sure to attach the right file.
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.