I've a table from a CSV which is converted by HTML and sent by email using Talend. To build the CSV to a HTML I am using a JavaRow:
componentcontext.MsgCode = "<br><br><style>table, td { word-wrap: keep-all; border: 1px solid black; border-collapse: collapse;}table, th { border: 1px solid black;}th, td {padding: 5px;},th {text-align: right;},th {background-color: #f2f2f2;},td{font-family: arial; font-size: 10pt;}</style> <table style=width:150px><tr> <th>column_A</th> <th>column_B</th> <th>column_C</th> <th>column_D</th>";
context.TableRow = "</td><td>"+input_row.column_A +"</td> <td>"+input_row.column_B +"</td> <td>"+input_row.column_C +"</td> <td>"+input_row.column_D+"</td> </tr>" + context.TableRow;
context.MsgCode = context.MsgCode + context.TableRow+ "</table>";
With this code I am getting the colours and the structure that I want however the size of the columns is comming very bad. For example, I am getting the following output:
What I have to add on my code in order to get the table with the correct columns sizes? I already change the style=width to 100% but without any good result. I want to have the following output:
Anyone can help me?