workbook .## S3 method for class 'workbook,numeric,numeric,numeric,numeric,numeric,logical':
readWorksheet(object,sheet,startRow,startCol,endRow,endCol,header)
## S3 method for class 'workbook,character,missing,missing,missing,missing,logical':
readWorksheet(object,sheet,startRow,startCol,endRow,endCol,header)
## S3 method for class 'workbook,numeric,missing,missing,missing,missing,logical':
readWorksheet(object,sheet,startRow,startCol,endRow,endCol,header)
## S3 method for class 'workbook,character,missing,missing,missing,missing,missing':
readWorksheet(object,sheet,startRow,startCol,endRow,endCol,header)
## S3 method for class 'workbook,numeric,missing,missing,missing,missing,missing':
readWorksheet(object,sheet,startRow,startCol,endRow,endCol,header)
## S3 method for class 'workbook,character,numeric,numeric,numeric,numeric,missing':
readWorksheet(object,sheet,startRow,startCol,endRow,endCol,header)
## S3 method for class 'workbook,numeric,numeric,numeric,numeric,numeric,missing':
readWorksheet(object,sheet,startRow,startCol,endRow,endCol,header)workbook to useTRUE.sheet. Data is read
starting at the top left corner specified by startRow and
startCol down to the bottom right corner specified by
endRow and endCol. If header = TRUE, the first row
is interpreted as column names of the resulting data.frame.
If
startRow <= 0<="" code=""> then the first available (logical) row is
assumed. If startCol <= 0<="" code=""> then the column of the first (logical)
cell of the start row (startRow) is assumed. If endRow <= 0<="" code="">
then the last available (logical) row is assumed. If endCol <= 0<="" code="">
then the column of the last (logical) cell of the end column
(endCol) is assumed. In other words, if no boundaries are
specified readWorksheet assumes the "bounding box" of the data as
the corresponding boundaries.
If all four coordinate arguments are missing this behaves as above with
startRow = 0, startCol = 0, endRow = 0 and
endCol = 0. In this case readWorksheet assumes the
"bounding box" of the data as the corresponding boundaries.
All arguments (except object) are vectorized. As such, multiple worksheets (and also multiple data regions
from the same worksheet) can be read with one method call. If only one single data region is read, the return value
is a data.frame. If multiple data regions are specified, the return value is a list of data.frame's
returned in the order they have been specified.=>=>=>=>workbook ,
writeWorksheet,
readNamedRegion,
writeNamedRegion,
readWorksheetFromFile# mtcars xlsx file from demoFiles subfolder of package XLConnect
demoExcelFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect")
# Load workbook
wb <- loadWorkbook(demoExcelFile)
# Read worksheet 'mtcars' (providing no specific area bounds;
# with default header = TRUE)
data <- readWorksheet(wb, sheet = "mtcars")Run the code above in your browser using DataLab