Read an Excel sheet via readxl::read_excel() with optional column-name
cleaning (janitor::clean_names()), basic type control, and CLI messages.
read_excel_flex(
file_path,
sheet = 1,
skip = 0,
header = TRUE,
range = NULL,
col_types = NULL,
clean_names = TRUE,
guess_max = 1000,
trim_ws = TRUE,
na = "",
verbose = TRUE
)A tibble (or data.frame) read from the Excel sheet.
Path to the Excel file (.xlsx or .xls).
Sheet name or index to read (default: 1).
Number of lines to skip before reading data (default: 0).
Logical. Whether the first row contains column names (default: TRUE).
Optional cell range (e.g., "B2:D100"). Default: NULL.
Optional vector specifying column types; passed to readxl.
Logical. Clean column names with janitor::clean_names() (default: TRUE).
Max rows to guess column types (default: 1000).
Logical. Trim surrounding whitespace in text fields (default: TRUE).
Values to interpret as NA (default: "").
Logical. Show CLI output (default: TRUE).