I have multiple dataframes, df1, df2 etc. Each dataframe contains different number of columns and rows. Using the StyleFrame library, is it possible to copy all the dataframes one by one into a single sheet in an excel file using the to_excel method by specifying cell locations? Currently, here's what I am doing:
Write df1 into Sheet1 of an excel file
writer = StyleFrame.ExcelWriter("filename")
sf1 = StyleFrame(df1)
#Perform formatting using apply_column_style, apply_headers_style etc.
sf1.to_excel(writer, sheet_name='Sheet1')
Write df2 into Sheet1 of an excel file
writer = StyleFrame.ExcelWriter("filename")
sf2 = StyleFrame(df2)
#Perform formatting using apply_column_style, apply_headers_style etc.
sf2.to_excel(writer, sheet_name='Sheet1') #Incorrectly overwrites df1 data in the excel
writer.save()
writer.close()
However, the sf2.to_excel() method overwrites df1 data in the excel. What I am looking for is to copy df1 data starting at cell location, say "A2", in Sheet1 and then sf2 data starting at location, say "B31", in the same sheet and so on.