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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Adding Table format in the SendMail Component

How i can add a proper table format to display the content in SendMail. Below is my Job
0683p000009MGT6.png 


Now the java flex has
         Start Code:
             String result_set="";
Main Code
result_set=result_set+"&nbsp;"+"&nbsp;"+"&nbsp;"+email_output.Name+"&nbsp;"+"&nbsp;"+"&nbsp;"+email_output.EmpID+"<p>";

End Code
      globalMap.put("result",result_set);



SendMail message has

(String)globalMap.get("result")

-Advance setting:   MIME type ='HTML'


I get output like below

eg:

---------------------------------------------------------------  Output -------------------------------------

Name           Number

Jhon   EMP00123
Daniel    EMP111111

-------------------------------------------------------------------------------------------------------------


This works, But you can see the column are not properly indent.

So how i can achieve the proper indent ?
Any help is greatly appreciated

My job desgin
0683p000009MGfu.png

Labels (2)
2 Replies
Anonymous
Not applicable
Author

hi Ikv,
Why are you using tjavaflex for that ?
branch your flow directly to tSendmail or use flowToIterate (that put each field in globalMap)

regards
laurent
Anonymous
Not applicable
Author

I got this by adding below code in Java Flex
Start code

 String result_set="<style>table, td {    border: 1px solid black;    border-collapse: collapse;}table, th { border: 2px solid black;}th, td {padding: 3px;},th {text-align: left;},th {background-color: DodgerBlue; color: white;},td{font-family: arial; font-size: 10pt;}</style> <table style=width:100%><tr><th>Name</th><th>Number</th> </tr>" ;


End Code
          result_set=result_set+"</table>";
      globalMap.put("result",result_set);