Use rbind() to join both data frames into one data frame.
Read both the sheets in separate data frames.-
Then use rbind() like below- for example i used global siperstore.xlsx file
> library(openxlsx)
> data_sheet1 = read.xlsx("C:\\Users\\Cherukuri_Sindhu\\Downloads\\global_superstore_2016.xlsx",sheet = 1)
> data_sheet2 = read.xlsx("C:\\Users\\Cherukuri_Sindhu\\Downloads\\global_superstore_2016.xlsx",sheet = 2)
> final_dataframe = rbind(data_sheet1,data_sheet2)
Make sure to have same number of columns of both sheets else below error would pop up -
I used the same sheet with the first 6 rows and last 6 rows in different data frames to combine them in a new data frame
Hope it helps you.