[R] Putting a bunch of Excel files as data.frames into a list fails

G.Maubach at weinwolf.de G.Maubach at weinwolf.de
Wed Sep 28 17:02:17 CEST 2016

Hi All,

I need to read a bunch of Excel files and store them in R.

I decided to store the different Excel files in data.frames in a named 
list where the names are the file names of each file (and that is 
different from the sources as far as I can see):

-- cut --
# Sources:
# - 
# - 
# - 

v_file_path <- "H:/2016/Analysen/Neukunden/Input"
v_file_pattern <- "*.xlsx"

v_files <- list.files(path = v_file_path,
                      pattern = v_file_pattern,
                      ignore.case = TRUE)

v_list_of_files <- list()

for (v_file in v_files) {
  v_list_of_files[v_file] <- openxlsx::read.xlsx(

This code does not work cause it stores only the first variable of each 
Excel file in a named list.

What do I need to change to get it running?

Kind regards


More information about the R-help mailing list