I use this script
library(openxlsx)
Output <- read.xlsx(xlsxFile = "Excel_file.xlsx", fillMergedCells =
TRUE,colNames = TRUE)
When i do this it works and does what it is supposed to do. The file contains a lot of merged rows and columns. However it doesn't always work. Is there another package or another script i can do that maybe can do overwrite? I'm wondering if that is the issue.
Otherwise when i try to run the script above again it tells me.
Error in read.xlsx(xlsxFile = "Excel_file.xlsx", fillMergedCells = TRUE, :
Please provide a sheet name OR a sheet index.
when i do and acknowledge adding sheet name or sheet index.....
library(openxlsx)
Output <- read.xlsx(xlsxFile = "Excel_file.xlsx", fillMergedCells = TRUE,colNames = TRUE,sheetIndex = 1)
or
library(openxlsx)
Output <- read.xlsx(xlsxFile = "Excel_file.xlsx", fillMergedCells = TRUE,colNames = TRUE,sheetName = "sheet 1")
i get another error message
Error in loadWorkbook(file, password = password) :
argument "file" is missing, with no default