existsSheet-methods

0th

Percentile

Checking for existence of worksheets in a workbook

Checks the existence of a worksheet in a '>workbook.

Keywords
methods, utilities
Usage
# S4 method for workbook
existsSheet(object,name)
Arguments
object

The '>workbook to 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.

See Also

'>workbook, createSheet, removeSheet, renameSheet, getSheets, cloneSheet

Aliases
  • existsSheet
  • existsSheet-methods
  • existsSheet,workbook-method
Examples
# NOT RUN {
# 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")
# }
Documentation reproduced from package XLConnect, version 0.2-15, License: GPL-3

Community examples

Looks like there are no examples yet.