1. 导入模块

    1)openpyxl
    2)样式模块:from openpyxl.styles import Font, PatternFill, Border, Side, Alignment

    1. 设置excel完整路径:url=r’x:\xxx\xxx\x.xlsx’
    2. 加载工作簿:wordbook=openpyxl.load_workbook(url)
    3. 获取所有标签:sheet_names=workbook.get_sheet_names() 或workbook.sheetnames
    4. 指定sheet