Python Forum

Full Version: Missing graph after combining xls files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:
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()
Is there anything missing in the above code?