get_excel_tables() is similar to getTables() but returns more information.

get_excel_tables(wb, sheets = NULL)

Arguments

wb

A workbook object

sheets

Character vector of sheet names to list tables from. If NULL, lists all sheets.

Value

A tibble with the worksheet, table name, and cell references.

See also

Other Read Excel tables: read_excel_table()

Examples

example_file <- system.file("examples/excel_examples.xlsx", package = "costmisc")

wb <- openxlsx::loadWorkbook(example_file)
get_excel_tables(wb)
#> # A tibble: 2 × 3
#>   sheet  table      range  
#>   <chr>  <chr>      <chr>  
#> 1 tables tbl_mtcars I2:T34 
#> 2 tables tbl_iris   B2:F152