I have an Excel file test.xlsx on my desktop and have a dataframe in R. How can I overwrite numbers in Excel file sheet "Capitals"? Say table in excel starts at B6 and has the same size as table in R.
I tried to run following command, however, it creates a new excel file, however I need to make changes in the existing one.
write.xlsx(df, file = "//Desktop//test.xlsx",
sheetName = "Capitals", append = TRUE)