read_excel_allsheets: Read all Excel sheets using 'readxl::read_excel()'...

View source: R/00-utils.R View source: R/05-as_any.R

read_excel_allsheetsR Documentation

Read all Excel sheets using readxl::read_excel() recursively

Description

The Excel file is read and the values are placed in a list of tibbles, with each sheet in a separate element in the list. If the Excel file has only one sheet, the output is a single tibble.

The Excel file is read and the values are placed in a list of tibbles, with each sheet in a separate element in the list. If the Excel file has only one sheet, the output is a single tibble.

Usage

read_excel_allsheets(filename, sheets = "", keep_as_list = FALSE)

read_excel_allsheets(filename, sheets = "", keep_as_list = FALSE)

Arguments

filename

A character string of the path of the Excel file.

sheets

A vector containing only the sheets to be read.

keep_as_list

A Boolean to say whether the object should be a list or a tibble, when there is only one sheet provided. FALSE by default.

Value

A list of tibbles corresponding to the sheets read, or a single tibble if the number of sheets is one.

A list of tibbles corresponding to the sheets read, or a single tibble if the number of sheets is one.

See Also

readxl::read_excel()

readxl::read_excel()

Examples

{

try(read_excel_allsheets(filename = tempfile()), silent = TRUE)

}

{

try(read_excel_allsheets(filename = tempfile()), silent = TRUE)

}


fabR documentation built on May 29, 2024, 2:58 a.m.