原始資料
一、將內容拷貝包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.其餘功能: