31-07-23 08:59 AM
Hi,
In my project I need to send a collection as an Email body table. I read some articles related to this. I have seen that it is possible with HTML table. Can anyone share a VB script for converting collection to HTML table as text?
Note that the collection row is dynamic.
Example:
Dear M,
Please find attched information.
Name |
A |
B |
C |
Regards,
E
31-07-23 04:10 PM
Hi Ekram,
you can create table row dynamically for the values available in collection as below:
Please let me know if you need any further help. Thanks
Regards,
Abhinav
31-07-23 07:46 PM
Hi Ekram,
I agree of using calculation stage to create html tags in collection,
If you have thousands of rows it will take very long time to generate html tag.
I never tried using C# to convert datatable/collection to HTML. YOu can check below code.
https://www.c-sharpcorner.com/UploadFile/deveshomar/export-datatable-to-html-in-C-Sharp/
02-08-23 09:45 AM
Thanks to both of you for the solutions. I will take a look at these and let you know.
10-08-23 08:01 AM
Hi @Abhinav Kumar,
I have tried your solution because I have data of only 10 rows. Unfortunately, it didn't work. Here is the screenshot:
10-08-23 02:15 PM
Hi Shihab
Please put IsHTML flag value as True and try again. Please see the below screenshot.
11-08-23 12:24 PM
Hi @Abhinav Kumar,
If I set isHTML flag as True, it works for [the follwing code.
coll2]&"<br></br>"& [Coll1.Company]& "</br>"
12-08-23 06:30 AM
Hi Shihab,
is email is not coming in below format and also can you let me know your requirements again ?
Dear M,
Please find attached information.
Name |
A |
B |
C |
Regards,
E
14-08-23 12:31 PM
Hi @Abhinav Kumar,
It is working right now.
If I write "</tr><tr><td>", it doesn't work. But when I write "<br></br>" then it works.
22-08-23 03:48 PM
Try this code stage using C#.