1、乱码

统一编码即可:

<meta charset="UTF-8">

template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="UTF-8"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>';

2、科学计数法

style中添加样式mso-number-format:'\@';  其他样式可以百度

<td align="center" style="width:200px;mso-number-format:'\@';" >
  <div style="" title="${ po.userTel } ">${ po.userTel }</div>
</td>

 

相关文章:

  • 2021-05-18
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2022-01-17
猜你喜欢
  • 2021-12-12
  • 2021-11-19
  • 2022-12-23
  • 2021-11-21
  • 2021-11-15
相关资源
相似解决方案