read_excel

0th

Percentile

Read xls and xlsx files.

Read xls and xlsx files.

Usage
read_excel(path, sheet = 1, col_names = TRUE, col_types = NULL, na = "", skip = 0)
Arguments
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 TRUE to use the first row as column names, FALSE to number columns sequentially from X1 to Xn, or a character vector giving a name for each column.
col_types
Either NULL to guess from the spreadsheet or a character vector containing "blank", "numeric", "date" or "text".
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.
Aliases
  • read_excel
Examples
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")
Documentation reproduced from package readxl, version 0.1.1, License: GPL-3 + file LICENSE

Community examples

nxskok@gmail.com at May 29, 2018 readxl v0.1.1

Note that the Excel spreadsheet must be local (a URL does not work). Example of creating, writing and reading a spreadsheet: ```{r} d=tribble( ~x, ~y, 1, 10, 2, 12, 3, 13, 4, 12 ) d l=list(d) openxlsx::write.xlsx(l, file = "thing.xlsx") d2=read_excel("thing.xlsx") d2 ```