I would like to create two tabs with Terms and Commloans. But when I am using this code, Terms are overwriting Commloans and I don't have these two tabs :/
library("openxlsx")
write.xlsx(Comms, file = "PnL.xlsx", sheetName="Commloans", append=TRUE)
write.xlsx(Terms, file = "PnL.xlsx", sheetName="Terms", append=TRUE)