saveWorkBook() function does not overwrite the file when loaded workbook is in same directory. It doesn't matter if the names are differentiated.
It instead creates a new file with the extension .xlsxTRUE or .xlsxFALSE depending on how you supply the overwrite argument
I'm using version 4.2.5 of the package
Using in R studio, R version 4.1.2
saveWorkBook() function does not overwrite the file when loaded workbook is in same directory. It doesn't matter if the names are differentiated. It instead creates a new file with the extension .xlsxTRUE or .xlsxFALSE depending on how you supply the overwrite argument I'm using version 4.2.5 of the package Using in R studio, R version 4.1.2
Example: wb <- loadWorkbook(paste0(dir_local,"LFS_data.xlsx")) writeData(wb, sheet = "SA2", basedef, colNames = FALSE, startRow = 1, startCol = length(result)) writeData(wb, sheet = "SA2", result, colNames = TRUE, startRow = 2) saveWorkbook(wb,paste0(dir_local,"LFS_data2.xlsx",overwrite = TRUE))