excel_util.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:cetusshop 作者: icetusorg 项目源码 文件源码
def write_file(path='',filename=''):
    import xlwt
    style0=xlwt.easyxf('font:name Times New Roman,color-index red,bold on',num_format_str='#,##0.00')
    style1=xlwt.easyxf(num_format_str='DD-MM-YY')
    wb = xlwt.Workbook()
    ws = wb.add_sheet('A Test Sheet')
    ws.write(0,0,1234.56,style0)
    ws.write(1,0,datetime.datetime.now(),style1)
    ws.write(2, 0, 1)
    ws.write(2, 1, 1)
    wb.save('example.xls')
    return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号