https://blog.csdn.net/qq_40910781/article/details/127270735
openpyxl os openpyxl.styles PatternFill file1=os.getcwd()+wb1=openpyxl.load_workbook(file1) sheet0_wb1=wb1.worksheets[] sheet1_wb1=wb1.worksheets[] (sheet1_wb1[]) list_column_A_sheet1_wb1 = (sheet1_wb1[]) datas_column_A_sheet1_wb1 = [] row list_column_A_sheet1_wb1: datas_column_A_sheet1_wb1.append((row.value).strip().upper()) cell sheet0_wb1[]: cell_value=(cell.value).strip().upper() cell_value datas_column_A_sheet1_wb1: (cell_value) cell.fill=PatternFill(=) wb1.save(file1) wb1.close()
联系客服