import codecs import pandas as pd xd = pd.ExcelFile('XXX.xls') pd.set_option('display.max_colwidth',1000)#设置列的宽度,以防止出现省略号 df = xd.parse() with codecs.open('XX.html','w') as html_file: html_file.write(df.to_html(header = True,index = False))
赞
踩
import codecs import pandas as pd xd = pd.ExcelFile('XXX.xls') pd.set_option('display.max_colwidth',1000)#设置列的宽度,以防止出现省略号 df = xd.parse() with codecs.open('XX.html','w') as html_file: html_file.write(df.to_html(header = True,index = False))
转载于:https://www.cnblogs.com/yaoliping/p/10019191.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。