I am working in R, trying to combine the data from a Sheet in 250 different Excel Files into one data frame. I have put all these files in a list called "Data.Files" and they all contain a sheet named "Selected".
However, not every "Selected" sheet has the same amount of columns and I need to figure out the column count for each so we can do an RBind. I already have the files in a list "Data.Files".
I tried to do df1=read_xlsx(data.files[1], ncol(sheet="Selections"))
But it will not work. Is there a way to do this so it prints out the column count for each file in the list? I am trying to figure out a way to get the Column Count of each Names sheet in the "Data.Files" list so it would print out something like this
Df1=93
Df2=94
etc for all the frames I've pulled from files. Any help is appreciated.
E: Essentially all I would need to do is to export the Global Environment summary as a csv.