原始资料
一、将内容拷贝包word
按住shift+F3转成大写(转换成小写方法一样)
{{ }}是邮件模板中需要替换的格式(变量)
2.word转html(将以上内容拷贝到)
因为标题拷贝过来有的会丢失字符大小,重新设置即可
<p>A new Investment</p>
<p>Review request has been submitted</p>
<table>
<tbody>
<tr>
<td width="355">
<p><strong><strong>End Customer Name </strong></strong></p>
</td>
<td width="355">
<p>{{END_CUSTOMER_NAME}}</p>
</td>
</tr>
<tr>
<td width="355">
<p><strong><strong>End Customer Number</strong></strong></p>
</td>
<td width="355">
<p>{{END_CUSTOMER_NO}}</p>
</td>
</tr>
</tbody>
</table>
<p> </p>
添加表格的宽度 <table border=\\\"1\\\"> 其中 \\\" 转义字符
在其中有一些需要删除
如 width="355"
<p> </p>
点击对号后clean可以去除
<p>A new Investment</p>
<p>Review request has been submitted</p>
<table>
<tbody>
<tr>
<td width="355">
<p><strong><strong>End Customer Name </strong></strong></p>
</td>
<td width="355">
<p>{{END_CUSTOMER_NAME}}</p>
</td>
</tr>
<tr>
<td width="355">
<p><strong><strong>End Customer Number</strong></strong></p>
</td>
<td width="355">
<p>{{END_CUSTOMER_NO}}</p>
</td>
</tr>
</tbody>
</table>
点击 compress 压缩后
<p>A new Investment</p><p>Review request has been submitted</p><table><tbody><tr><td width="355"><p><strong><strong>End Customer Name </strong></strong></p></td><td width="355"><p>{{END_CUSTOMER_NAME}}</p></td></tr><tr><td width="355"><p><strong><strong>End Customer Number</strong></strong></p></td><td width="355"><p>{{END_CUSTOMER_NO}}</p></td></tr></tbody></table>
3.代码测试
菜鸟HTML运行
https://www.runoob.com/try/try.php?filename=tryhtml_intro
然后利用excel模板insert数据库即可
备注:
1.也可利用.nodepad++
\r\n替换为空格(行尾符号)
2.其余功能: