Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sheetCount

Count or list sheet names in Excel spreadsheet files.


Description

Count or list sheet names in Excel spreadsheet files.

Usage

sheetCount(xls, verbose = FALSE, perl = "perl")
sheetNames(xls, verbose = FALSE, perl = "perl")

Arguments

xls

File path to spreadsheet. Supports "http://", "https://", and "ftp://" URLS.

verbose

If TRUE, show additional messages during processing.

perl

Path to perl interpreter.

Value

sheetCount returns the number of sheets in the spreadsheet. sheetNames returns the names of sheets in the spreadsheet.

See Also

Examples

xlsfile <- system.file("xls", "iris.xls", package = "gdata")
   xlsfile

   sheetCount(xlsfile)


   exampleFile <- file.path(path.package('gdata'),'xls',
                            'ExampleExcelFile.xls')
   exampleFile2007 <- file.path(path.package('gdata'),'xls',
                            'ExampleExcelFile.xlsx')

   sheetCount(exampleFile)

   if( 'XLSX' %in% xlsFormats() )  # if XLSX is supported..
     sheetNames(exampleFile2007)

gdata

Various R Programming Tools for Data Manipulation

v2.18.0
GPL-2
Authors
Gregory R. Warnes, Ben Bolker, Gregor Gorjanc, Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, Arni Magnusson, Jim Rogers, and others
Initial release
2017-06-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.