python中openpyxl模块操作excel
import pandas as pd from openpyxl.utils import get_column_letter, column_index_from_string import openpyxl wb = openpyxl.load_workbook('cases.xlsx') sh = wb['Sheet1'] for i in range(2,100000): ce = sh.cell(row = i,column = column_index_from_string('w')) print(ce.value) sh.cell(row = i,column =column_index_from_string('f'),value =ce.value) wb.save(r'cases.xlsx') wb.close()