Apr-15-2020, 10:51 AM
Hello,
I have multiple xls files , some with graphs.I am combining these files into worksheets of a single xlsx workbook.
After combining, the final output xls workbook does not have the graphs.Below is the code Iam using to combine the xls file:
Is there anything missing in the above code?
I have multiple xls files , some with graphs.I am combining these files into worksheets of a single xlsx workbook.
After combining, the final output xls workbook does not have the graphs.Below is the code Iam using to combine the xls file:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import pandas as pd import os import csv import glob path = './' all_files = glob.glob(os.path.join(path, "*.xlsx" )) writer = pd.ExcelWriter( 'out.xlsx' , engine = 'xlsxwriter' ) for f in all_files: df = pd.read_excel(f) df.to_excel(writer, sheet_name = os.path.splitext(os.path.basename(f))[ 0 ], index = False ) writer.save() |