excel_sheets for information

Alternatively, we can use excel_sheets() to get information on all worksheets in an Excel spreadsheet, and then read the one(s) you’re interested in.

excel_sheets("data/penguins.xlsx")
## [1] "Torgersen Island" "Biscoe Island"    "Dream Island"

Once you know the names of the worksheets, you can read them in individually with read_excel().

penguins_biscoe <- read_excel("data/penguins.xlsx", sheet = "Biscoe Island", na = "NA")

penguins_dream  <- read_excel("data/penguins.xlsx", sheet = "Dream Island", na = "NA")
dim(penguins_torgersen)
## [1] 52  8
dim(penguins_biscoe)
## [1] 168   8
dim(penguins_dream)
## [1] 124   8