How to extract sheet names from Excel file in R

老子叫甜甜 提交于 2019-11-28 09:45:02

You are looking for getSheets

Returns all worksheet names in a workbook.

Another really nice package developed by the folks at RStudio is readxl. It's easy to get the excel sheet names with the excel_sheets() function.

library(readxl)
path <- "path/to/your/file.xlsx"
excel_sheets(path = path)
soubhagya laxmi Tripathy
dataIn <-loadWorkbook(file.path(filenames[1], sep=""))

sheet <- getsheets(dataIn)

To get the 1st sheet use sheet[1]

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!