Given several .xls
files with varying number of sheets, I am reading them into R
usingread.xls
from the gdata
package. I have two related issues (solving the second issue should solve the first):
- It is unknown ahead of time how many sheets each
.xls
file will have, and in fact this value will vary from one file to the next. - I need to capture the name of the sheet, which is relevant data
Right now, to resolve (1), I am using try()
and iterating over sheet numbers until I hit an error.
How can I grab a list of the names of the sheet so that I can iterate over them?
gdata
, but even then I was happily proven incorrect. I will edit my question when I get back to my computer – Janitajanith