import codecs
import pandas as pd
xd = pd.ExcelFile('./20200325北京消息计费系统日报.xlsx')
pd.set_option('display.max_colwidth',1000)#设置列的宽度,以防止出现省略号
df = xd.parse()

with codecs.open('20200325北京消息计费系统日报.html','w',encoding='utf-8') as html_file:
html_file.write("" + '\n')
html_file.write("" + '\n')
html_file.write(df.to_html(header = True,index = False))
html_file.write("")

还可以设置css样式 可参考https://www.cnblogs.com/xiao987334176/p/14138883.html

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案