import pandas as pd
result=pd.read_excel(r'E:\Users\Desktop\result.xlsx')
excel_dict = {}
for sn in range(0,len(pd.ExcelFile(r'E:\Users\Desktop\数据.xlsx').sheet_names)):
excel_dict[sn] = pd.read_excel(r'E:\Users\Desktop\数据.xlsx',sheetname=sn,header=1)
result[sn]=excel_dict[sn]['列名']
pd.DataFrame(result).to_excel(r"E:\Users\Desktop\<span style="font-family: Arial, Helvetica, sans-serif;">result</span><span style="font-family: Arial, Helvetica, sans-serif;">.xlsx") </span>
提取多个excel某一列,合并到一个新的exce
最新推荐文章于 2024-08-19 10:14:50 发布