Learn R Programming

XLConnect (version 1.0.7)

removeName-methods: Removing names from workbooks

Description

Removes a name from a workbook.

Usage

# S4 method for workbook
removeName(object,name)

Arguments

object

The workbook to use

name

The name to delete

Author

Martin Studer
Mirai Solutions GmbH https://mirai-solutions.ch

Details

Removes the name named name from the specified workbook object if it does exist. Multiple names can be specified to be removed.

See Also

workbook, createName, existsName,
getDefinedNames, readNamedRegion, writeNamedRegion

Examples

Run this code
if (FALSE) {
# mtcars xlsx file from demoFiles subfolder of package XLConnect
mtcarsFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect")

# Load workbook
wb <- loadWorkbook(mtcarsFile)

# Remove the named region called 'mtcars' from the above file
# (this named region is defined as 'mtcars!$A$1:$K$33')
removeName(wb, name = "mtcars")
}

Run the code above in your browser using DataLab