readNamedRegionFromFile: Reading named regions from an Excel file (wrapper function)

View source: R/readNamedRegionFromFile.R

readNamedRegionFromFileR Documentation

Reading named regions from an Excel file (wrapper function)

Description

Reads named regions from an Excel file.

Usage

readNamedRegionFromFile(file, ...)

Arguments

file

The file name of the workbook to read

...

Arguments passed to readNamedRegion

Details

This is a convenience wrapper to read named regions from a file without creating an intermediate workbook object. See readNamedRegion for more details.

Author(s)

Thomas Themel
Mirai Solutions GmbH https://mirai-solutions.ch

See Also

readNamedRegion, readWorksheetFromFile, writeNamedRegionToFile,
writeWorksheetToFile, onErrorCell

Examples

## Not run: 
# multiregion xlsx file from demoFiles subfolder of package XLConnect
demoExcelFile <- system.file("demoFiles/multiregion.xlsx", 
                             package = "XLConnect")
                             
# Load a single named region into a single data.frame.
df <- readNamedRegionFromFile(demoExcelFile, name="Iris")

# Load multiple regions at once - returns a (named) list 
# of data.frames.
df <- readNamedRegionFromFile(demoExcelFile, 
                              name=c("Calendar", "Iris", "IQ"))

## End(Not run)

miraisolutions/xlconnect documentation built on March 19, 2024, 6:37 p.m.