read_excel_allsheets {fabR} | R 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
Examples
{
try(read_excel_allsheets(filename = tempfile()), silent = TRUE)
}
{
try(read_excel_allsheets(filename = tempfile()), silent = TRUE)
}