The following works great to look through a folder of .xlsx files and append them. But it only works to append the first tab and save the appended first tabs. I know about read pd.read_excel(f, sheet_name=None)- but this just does not work, I really want the output file to have multiple tabs, appended respectively as the first tab does. Any Idea?
import glob
import pandas as pd
import xlrd
#import XlsxWriter
all_data = pd.DataFrame()
for f in glob.glob(r'C:\*'):
df = pd.read_excel(f)
all_data = all_data.append(df,ignore_index=True)
writer = pd.ExcelWriter('test.xlsx', engine='xlsxwriter')
all_data.to_excel(writer)
writer.save()