How to Read an Excel File in R

· 1 min read · Updated March 15, 2026 · beginner
r excel data-import readxl openxlsx

Excel files are everywhere in data work. R has several solid options for reading them.

With readxl

The readxl package is part of the tidyverse and handles .xls and .xlsx files:

library(readxl)
df <- read_excel("data.xlsx")

Read a specific sheet by name or number:

df <- read_excel("data.xlsx", sheet = "Sales")
df <- read_excel("data.xlsx", sheet = 2)

See Also