getTables-methods

0th

Percentile

Querying available Excel tables in a workbook

Queries the available Excel tables on the specified worksheet.

Keywords
methods, utilities
Usage
# S4 method for workbook,numeric
getTables(object,sheet,simplify)
# S4 method for workbook,character
getTables(object,sheet,simplify)
Arguments
object

The '>workbook to use

sheet

Index (integer) or name (character) of worksheet to query

simplify

logical specifying if the result should be simplified (defaults to TRUE). See details.

Details

Since this is a vectorized function (multiple sheets can be specified) the result is a named list (one component per sheet) if no simplification is applied. In cases where only one sheet is queried and simplify = TRUE (default) the result is simplified to a vector.

See Also

'>workbook, getSheets, readTable

Aliases
  • getTables
  • getTables-methods
  • getTables,workbook,numeric-method
  • getTables,workbook,character-method
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)

# Query available tables (table names) on sheet 'mtcars_table'
tables <- getTables(wb, sheet = "mtcars_table")

# ... or via sheet index
tables <- getTables(wb, sheet = 4)
# }
Documentation reproduced from package XLConnect, version 0.2-15, License: GPL-3

Community examples

Looks like there are no examples yet.