On 24/06/11 16:55, bill.venab...@csiro.au wrote:
Package XLConnect appears to provide this kind of thing.
-----Original Message-----
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Shi, Tao
Sent: Friday, 24 June 2011 2:42 PM
To: r-help@r-project.org
Subject: [R] extract worksheet names from an Excel file
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!
...Tao
______________________________________________
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.
______________________________________________
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.
If you use RODBC to connect to an xls or xlsx file you can use sqlTables
to show not only the worksheet names, but the presence of any named data
ranges.
Sample code from a student exercise:
require(RODBC)
channel <- odbcConnectExcel("bikesWithDate.xls")
sqlTables(channel)
David
--
_________________________________________________________________
David Scott Department of Statistics
The University of Auckland, PB 92019
Auckland 1142, NEW ZEALAND
Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
Email: d.sc...@auckland.ac.nz, Fax: +64 9 373 7018
______________________________________________
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.