I have to read multiple xlsx file with random names into single dataframe. Structure of each file is same. I have to import specific columns only.
I tried this:
dat <- read.xlsx("FILE.xlsx", sheetIndex=1,
sheetName=NULL, startRow=5,
endRow=NULL, as.data.frame=TRUE,
header=TRUE)
But this is for only one file at a time and I couldn't specify my particular columns. I even tried :
site=list.files(pattern='[.]xls')
but after that loop isn't working. How to do it? Thanks in advance.