
Checking for existence of worksheets in a workbook
existsSheet-methods.RdChecks the existence of a worksheet in a workbook.
Arguments
- object
The
workbookto use- name
The sheet name to check for
Details
Checks if the specified worksheet exists. Returns TRUE if it
exists, otherwise FALSE. The name argument is vectorized
which allows to check for existence of multiple worksheets with one call.
Author
Martin Studer
Mirai Solutions GmbH https://mirai-solutions.ch
Examples
if (FALSE) { # \dontrun{
# mtcars xlsx file from demoFiles subfolder of package XLConnect
demoExcelFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect")
# Load workbook
wb <- loadWorkbook(demoExcelFile)
# Check for existence of a worksheet called 'mtcars'
existsSheet(wb, "mtcars")
} # }