readWorksheetFromFile: Reading data from worksheets in an Excel file (wrapper...

Description Usage Arguments Details Author(s) See Also Examples

View source: R/readWorksheetFromFile.R

Description

Reads data from worksheets in an Excel file.

Usage

1

Arguments

file

The path name of the file to read from.

...

Arguments passed to readWorksheet

Details

See readWorksheet for more information.

Author(s)

Thomas Themel
Mirai Solutions GmbH http://www.mirai-solutions.com

See Also

readWorksheet, readNamedRegionFromFile, writeWorksheetToFile,
writeNamedRegionToFile, onErrorCell

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# multiregion xlsx file from demoFiles subfolder of 
# package XLConnect
demoExcelFile <- system.file("demoFiles/multiregion.xlsx", 
                             package = "XLConnect")

# Read single area from first sheet of existing file,
# "B2:C3" in Excel speak
df.one <- readWorksheetFromFile(demoExcelFile, sheet = 1, 
                                header = FALSE, startCol = 2, 
                                startRow = 2, endCol = 3, 
                                endRow = 3)

# Read three data sets in one from known positions
dflist <- readWorksheetFromFile(demoExcelFile,
                                sheet = c("FirstSheet", 
                                          "FirstSheet", 
                                          "SecondSheet"),
                                header = TRUE, 
                                startRow = c(2,2,3), 
                                startCol = c(2,5,2),
                                endCol = c(5,8,6), 
                                endRow = c(9,15,153))

XLConnect documentation built on May 29, 2017, 7:04 p.m.