[R] extract worksheet names from an Excel file
Shi, Tao
shidaxia at yahoo.com
Sat Jun 25 08:09:36 CEST 2011
Thanks, Gabor! That's really helpful!
...Tao
----- Original Message -----
> From: Gabor Grothendieck <ggrothendieck at gmail.com>
> To: "Shi, Tao" <shidaxia at yahoo.com>
> Cc: "r-help at r-project.org" <r-help at r-project.org>
> Sent: Friday, June 24, 2011 5:02 AM
> Subject: Re: [R] extract worksheet names from an Excel file
>
> On Fri, Jun 24, 2011 at 12:41 AM, Shi, Tao <shidaxia at 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
>
More information about the R-help
mailing list