clearRangeFromReference-methods: Clearing cell ranges in a workbook

clearRangeFromReference-methodsR Documentation

Clearing cell ranges in a workbook

Description

Clears cell ranges specified by area reference in a workbook.

Usage

  ## S4 method for signature 'workbook,character'
clearRangeFromReference(object, reference)

Arguments

object

The workbook to use

reference

character specifying an area reference in the form 'SheetX!A7:B19'

Details

Clearing a cell range means to clear all the cells associated with that range. This method is very similar to clearRange.

Author(s)

Nicola Lambiase
Mirai Solutions GmbH https://mirai-solutions.ch

See Also

workbook, clearSheet, clearNamedRegion, clearRange, clearSheet

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)

# Clear ranges A5:D6 and G5:I7 on sheet mtcars
clearRangeFromReference(wb, reference = c("mtcars!A5:D6",
                        "mtcars!G5:I7"))

## End(Not run)

XLConnect documentation built on Sept. 11, 2024, 8:04 p.m.