• openpyxl模块介绍 ——原有excel表格中创建sheet ——并写入数据


    
    
    import openpyxl

    wb = openpyxl.load_workbook('C:\\Users\\del\\Desktop\\温职.xlsx')


    ws1=wb.create_sheet('china',0)


    #---------------------------------------------------------
    ws1['A1'] = 'juankuan'
    ws1['E1'] = '中国'
    ws1['F1'] = '2020-02-27-09-51-02'

    #-----------------------------------------------

    wb.save('C:\\Users\\del\\Desktop\\温职.xlsx')




    ======================================================================================================






    import
    openpyxl wb = openpyxl.load_workbook('C:\\Users\\del\\Desktop\\温职.xlsx') sheetxx = wb.create_sheet('china',0) #--------------------------------------------------------- sheetxx['A1'] = 'juankuan' sheetxx['E1'] = '中国' sheetxx['F1'] = '2020-02-27-09-51-02' #----------------------------------------------- wb.save('C:\\Users\\del\\Desktop\\温职.xlsx')

  • 相关阅读:
    面试问题记录
    面试问题记录
    面试问题记录
    JavaScript => ?
    Jsr303数据校验
    在浏览器上开发GO和Vue!(基于code-server)
    IdentityServer4 4.0.0
    9/13-9/18
    9/6-9/10
    8/30-9/3
  • 原文地址:https://www.cnblogs.com/xiaobaibailongma/p/12387693.html
Copyright © 2020-2023  润新知