read_excel {readxl} | R Documentation |
Read xls and xlsx files.
read_excel(path, sheet = 1, col_names = TRUE, col_types = NULL, na = "", skip = 0)
path |
Path to the xls/xlsx file |
sheet |
Sheet to read. Either a string (the name of a sheet), or an integer (the position of the sheet). Defaults to the first sheet. |
col_names |
Either |
col_types |
Either |
na |
Missing value. By default readxl converts blank cells to missing data. Set this value if you have used a sentinel value for missing values. |
skip |
Number of rows to skip before reading any data. |
datasets <- system.file("extdata/datasets.xlsx", package = "readxl") read_excel(datasets) # Specific sheet either by position or by name read_excel(datasets, 2) read_excel(datasets, "mtcars")