After studying for a long time, I finally got it
Look at the code:
import pandas as pd import numpy as np import glob filearray=[] filelocation="file address" for filename in glob.glob(filelocation+"*.xlsx"): filearray.append(filename) res=pd.read_excel(filearray[0]) for i in range(1,len(filearray)): A=pd.read_excel(filearray[i]) res=pd.concat([res,A],ignore_index=True) print(res.index) writer = pd.ExcelWriter('output.xlsx') res.to_excel(writer,'sheet1') writer.save()