I am looking into exporting multiple data frames into the same excel worksheet. Any idea how I can do this?
write.xlsx(test_dataframe, file = "D:/test.xlsx",sheetName = "sheet1", append = TRUE)
I have tried the above command. But all this does is export the data frame to it's own worksheet. So for example if I am creating 4 data frames in an RMD file, I get 4 excel worksheets. I want to be able to get the 4 data frames into the same excel worksheet.
The reason I want to achieve this is my data frames are actually pivot tables that I built in R. Any help on this is much appreciated. Visually this is what I am trying to achieve