On Fri, Jun 24, 2011 at 12:41 AM, Shi, Tao <shida...@yahoo.com> wrote: > Hi list, > > Is there a R function I can use to extract the worksheet names from an Excel > file? If no, any other automatic ways (not using R) to do this? > > thanks! >
Many or all of the Excel interfaces listed here: http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows&s=excel can do that but be careful since one or more the packages listed there always returns the sheet names sorted in alphabetical order which means that you can't tell which is the first sheet, which is the second, etc. (if that is important). gdata has a specific function to do it: library(gdata) sheetNames("myfile.xls") -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.