Table Formatting in HTML

@arivu96 now it also shows an error that your string format is not correct.

Hi @kapildarmoda,

Can you send me the screenshot of what u have done?


Try this:

td:nth-child(2) {
    text-align: center;



Main.xaml (22.9 KB)

didn’t work.

Hey @kapildarmoda

There was problem with your Html Conent. just learn about Html too :slight_smile:

tag should be close too like and end tag too

Find below sample reference for your better understanding -KapilSample.xaml (26.0 KB)


In your screenshot, column 2 is still left aligned. and when i use your code, it throws me an error “string format is not correct”.

<table style=“width:100%”>

@misha I want to format (text alignment) columns of table.

Hey @kapildarmoda

Have a look with this: KapilSample.xaml (26.0 KB)



Hi @aksh1yadav, thanks for your response. if I use your code then I need to remove assign activity and without that I can pass {0}. you can see in your screenshot.

@sarathi125 @arivu96 @aksh1yadav can you see whats the problem.

actual output: all table content left aligned
desired output: middle column content must be center aligned

if i use- th:nth-child(2),td:nth-child(2) {text-align: center;} it will give me error in assign activity.
if i use- th:nth-child(2),td:nth-child(2) {{text-align: center;}} it will make no change.

Main.xaml (22.9 KB)


@lakshman can you please help.


You want center alignment for second column only right ? And also please send me your table data.

@lakshman yes, this time i want it for second column only. However, want to learn logic also, so that i can use it with multiple columns later.

Main.xaml (22.9 KB)
Feedback12345.xlsx (8.1 KB)

I used assign activity at the end so to pass dynamic name in each email.


Please find the attached File.

ExcelToMail.xaml (26.3 KB)

If you want text alignment for other columns then you can change here:

If you have any doubts then please let me know.

@lakshman it didn’t work. it has following problem:

  1. header color is not there
  2. dynamic name does not appear. it shows “Hi {0}”. if you delete assign activity.


I didn’t put any color for header.

I forgot to add this part. Take assign activity and use this syntax: body text.replace(“{0}”, “RequiredName”)

table formatting in html can be done with the help
of ‘table’ tag and for adding any column you
can use ‘td’ tag and ‘th’ tag for rows.