cancel
Showing results for 
Search instead for 
Did you mean: 

Search for VB script for converting collection as HTML table

Anonymous
Not applicable

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

9 REPLIES 9

abhinav.kumar
Level 3

Hi Ekram,

you can create table row dynamically for the values available in collection as below:

35768.png

Please let me know if you need any further help. Thanks

Regards,

Abhinav

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/

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

Anonymous
Not applicable

Thanks to both of you for the solutions. I will take a look at these and let you know.

Anonymous
Not applicable

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:

35772.png

35773.png

35774.png

35775.png

35776.png

abhinav.kumar
Level 3

Hi Shihab

Please put IsHTML flag value as True and try again. Please see the below screenshot.

35777.png

Anonymous
Not applicable

Hi @Abhinav Kumar,

If I set isHTML flag as True, it works for  [the follwing code.

coll2]&"<br></br>"& [Coll1.Company]& "</br>"

abhinav.kumar
Level 3

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

Anonymous
Not applicable

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.

jsantiago08
Level 5

Try this code stage using C#.

35778.png

35779.png

35780.png