I have a collection of excel files which I am importing into R
.
The files contain hidden data which I would like to disregard -- eg, simply not importing it, or importing it with a flag indicating it was hidden so that I can then drop it.
The files contain two types of hidden data:
- Complete sheets are hidden
- Specific Rows within a sheet are hidden.
Is there a way to identify when data in excel is hidden?
Right now I am using the gdata
package, but am happy to use XLConnect
or other package
Sample Code:
library(gdata)
xlsfile <- "test.xls"
# grab all the sheet names.
# This is giving me both hidden & non-hidden sheets. I would like only the latter
sheets <- sheetNames(xlsfile)
# read in the xls file, by sheet
xlData <-
lapply(sheets, function(s)
read.xls(xlsfile, sheet=s, stringsAsFactors = FALSE))
if needed, I can create a dummy xls
file and post it.
visible
flag something that is (or could be) exported? – Silda