Python Forum
Missing graph after combining xls files - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Missing graph after combining xls files (/thread-25906.html)



Missing graph after combining xls files - Kishore01 - Apr-15-2020

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?