java - Talend - 发送 HTML 表格 - 保证我们没有换行
问题描述
我正在使用 Talend Big Data Platform 通过电子邮件将 CSV 作为 HTML 表格发送。要构建 HTML 代码,我有一个 JavaRow:c
ontext.MsgCode = "<br><br><style>table, td { white-space: nowrap; border: 1px solid black; border-collapse: collapse;}table, th { white-space: nowrap; border: 1px solid black;}th, td { white-space: nowrap;},th {text-align: left;},th {background-color: #f2f2f2;},td{font-family: arial; font-size: 10pt;}</style> <table white-space: nowrap;> <tr><th white-space: nowrap;>warehouse</th><th white-space: nowrap;>process</th><th white-space: nowrap;>time</th><th>type</th><th>title</th><th white-space: nowrap;>analysis</th></tr>";
context.TableRow = "</td><td>"+input_row.warehouse+"</td><td>"+input_row.process+"</td><td>"+input_row.time+"</td><td>"+input_row.type+"</td><td>"+input_row.title+"</td><td>"+input_row.analysis+"</td></tr>" + context.TableRow;
context.MsgCode = context.MsgCode + context.TableRow+ "</table>";
使用此代码,我的表将包装我的列,我得到列名和值减半。
我想要的是包装文本以适应列宽并且在单元格中没有任何截断。
我做错了什么?
非常感谢!
解决方案
推荐阅读
- delphi - 尽可能虚拟地填充 VirtualStringTree?
- java - java中的迭代器和while
- c# - 如何在 WPF 中从头开始创建 pdf 查看器
- python - Kivy:创建新的时覆盖默认的 kivy.properties
- firebase - 有没有办法将 Firebase 存储配置为仅从设备授予匿名访问权限?
- openssl - 使用 openssl 1.0.2k 在我的代码中报告了双倍免费
- javascript - Onclick 按钮在选项标签中的 vue.js 中不起作用
- sql - SQL:WHERE 子句可以提高 SELECT DISTINCT 查询的速度吗?
- swift - 如何在 SwiftUI 中创建一个返回一些视图并接受闭包的函数?
- c - 没有 while(1) 为什么 MPLAB 中的这段代码连续运行