existsName-methods: Checking existence of names in a workbook

Description Usage Arguments Details Author(s) See Also Examples

Description

Checks the existence of a name in a workbook.

Usage

1
2
## S4 method for signature 'workbook'
existsName(object, name)

Arguments

object

The workbook to use

name

The name to check for

Details

Returns TRUE if the specified name exists and FALSE otherwise. Note that the name argument is vectorized and therefore multiple names can be checked for existence in one method call.

Author(s)

Martin Studer
Mirai Solutions GmbH http://www.mirai-solutions.com

See Also

workbook, createName, removeName, getDefinedNames, readNamedRegion,
writeNamedRegion

Examples

1
2
3
4
5
6
7
8
9
# mtcars xlsx file from demoFiles subfolder of package XLConnect
mtcarsFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect")

# Load workbook
wb <- loadWorkbook(mtcarsFile)

# Check if the name 'mtcars' exists
# (should return TRUE since the name is defined as 'mtcars!$A$1:$K$33')
existsName(wb, name = "mtcars")

XLConnect documentation built on April 6, 2018, 1:03 a.m.