if (FALSE) {
xlsfile <- system.file("xls", "iris.xls", package = "gdata")
xlsfile
sheetCount(xlsfile)
sheetNames(xlsfile) # no names, so numbers returned
exampleFile <- system.file('xls', 'ExampleExcelFile.xls', package="gdata")
sheetCount(exampleFile)
sheetNames(exampleFile)
if( 'XLSX' %in% xlsFormats() ) # if XLSX is supported..
{
exampleFile2007 <- system.file('xls','ExampleExcelFile.xlsx', package="gdata")
print( sheetCount(exampleFile2007) )
print( sheetNames(exampleFile2007) )
}
}
Run the code above in your browser using DataLab