| read_file_excel | R Documentation |
read_file_excel() reads Excel files using
read_excel().
read_file_excel(
file,
range = NULL,
col_types = "text",
na = c("", ".", "NA", "na", "Na", "N/A", "n/a", "N/a", "NULL", "null", "Null"),
guess_max = .Machine$integer.max%/%100L,
...
)
file |
Path to the xls/xlsx file |
range |
A cell range to read from, as described in cell-specification.
Includes typical Excel ranges like "B3:D87", possibly including the sheet
name like "Budget!B2:G14", and more. Interpreted strictly, even if the
range forces the inclusion of leading or trailing empty rows or columns.
Takes precedence over |
col_types |
Either |
na |
Character vector of strings to interpret as missing values. By default, readxl treats blank cells as missing data. |
guess_max |
Maximum number of data rows to use for guessing column types. |
... |
Additional arguments to pass to
|
By default, read_file_excel() does not attempt to guess column types and
reads all columns as character. This can be changed by setting
col_types = "guess". If columns are
guessed, the default is to use all rows; this can be changed by setting
guess_max to a different value.
Note that when reading Excel files as character, dates will be read as the
Excel numeric representation in character format
(i.e. the date 2020-01-01 will be read as "43831"). These dates can be
parsed into Date format using std_dates()
or any of the janitor package's date conversion functions (the most basic
being excel_numeric_to_date()).
read_file_excel() will eventually be paired with
read_file_delim() to replace the internals of
read_file().
A tibble
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.