制作带表格的邮件模板(将word格式的转为HTML)

原始资料

一、将内容拷贝包word

按住shift+F3转成大写(转换成小写方法一样)

{{ }}是邮件模板中需要替换的格式(变量)

2.word转html(将以上内容拷贝到)

https://wordhtml.com/

 因为标题拷贝过来有的会丢失字符大小,重新设置即可

<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>&nbsp;</p>

添加表格的宽度 <table border=\\\"1\\\">   其中 \\\" 转义字符

 在其中有一些需要删除

如 width="355" 

 <p>&nbsp;</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.其余功能:

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

javafanwk

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值