Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Darmesh
Contributor III
Contributor III

How to color the table format using HTML in Talend

How to color the DB_Filename (i.e) Highlighted one should be in color using HTML.

 

This is the HTML code for the below output.

//Code generated according to input schema and output schema
context.File_Location = input_row.A;
context.Duplicate_Files = input_row.B;
context.Last_Modified_date = input_row.C;
context.DB_FileName = input_row.D;


String msg = ((String)globalMap.getOrDefault("mailMsg", "<body> <table border=\"1\"><tr><th>File_Location</th><th>Duplicate_Files</th><th>Last_Modified_date</th><th>DB_FileName</th></tr>"));
msg = msg +
"<tr><td>" + context.File_Location + "</td>" +
"<td>" + context.Duplicate_Files + "</td>" +
"<td>" + context.Last_Modified_date + "</td>" +
"<td>" + context.DB_FileName + "</td></tr>";

globalMap.put("mailMsg", msg);

 

0683p000009M8qg.jpg0683p000009M8lN.jpg

Labels (3)
1 Reply
TRF
Champion II
Champion II

You may try this one:

"<td>" + context.Last_Modified_date + "</td>" +
"<td><span style=\"color: #ffff00;\">" + context.DB_FileName + "</span></td></tr>";