'How to merge data from several Excel sheets in several Excel files in a folder?

I did some research on this before posting and I came up with this script (which doesn't work):

library(gdata)
setwd("C:/Users/rshuell001/Desktop/excel_files")
data.files = list.files(pattern = "*.xls") 

files<-data.files

#get list of files
data.to.merge <- lapply(files, read.xls) #read in files using lapply

After the data.to.merge, I get this error:

Error in findPerl(verbose = verbose) :

How can I get this to work?

r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source