@arivu96 now it also shows an error that your string format is not correct.
Try this:
th:nth-child(2),
td:nth-child(2) {
text-align: center;
}
Sample-JSFIDDLE
Regardsā¦!!
Aksh
didnāt work.
Hey @kapildarmoda
There was problem with your Html Conent. just learn about Html too
Find below sample reference for your better understanding -KapilSample.xaml (26.0 KB)
Regardsā¦!!
Aksh
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%ā>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
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)
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:
- header color is not there
- 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.