Load specified sheets from an Excel file into a list of data frames
load_sheets_as_list.Rd
This function reads specified sheets from an Excel file and returns them as a list of data frames. It provides options to skip rows, force date columns to be of Date type, and drop unnamed columns.
Arguments
- file_path
A character string specifying the path to the Excel file.
- sheets
A character vector specifying the names of the sheets to be read.
- skip
An integer specifying the number of rows to skip at the beginning of each sheet. Default is 0.
- force_date
A logical indicating whether to attempt to convert date columns to Date type. Default is TRUE.
- drop_unnamed
A logical indicating whether to drop unnamed columns (columns with no header). Default is TRUE.
- col_types
A list the same length as sheets, containing either NULL or a character vector of read_excel classes.
Examples
if (FALSE) { # \dontrun{
sheets_data <- load_sheets_as_list("path/to/file.xlsx", c("Sheet1", "Sheet2"), skip = 1)
} # }