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

View source: R/readWorksheetFromFile.R

readWorksheetFromFileR Documentation

Reading data from worksheets in an Excel file (wrapper function)


Reads data from worksheets in an Excel file.


readWorksheetFromFile(file, ...)



The path name of the file to read from.


Arguments passed to readWorksheet


See readWorksheet for more information.


Thomas Themel
Mirai Solutions GmbH

See Also

readWorksheet, readNamedRegionFromFile, writeWorksheetToFile,
writeNamedRegionToFile, onErrorCell


## Not run: 
# 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 <- 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", 
                                header = TRUE, 
                                startRow = c(2,2,3), 
                                startCol = c(2,5,2),
                                endCol = c(5,8,6), 
                                endRow = c(9,15,153))

## End(Not run)

XLConnect documentation built on Feb. 16, 2023, 5:53 p.m.