Well, first of all it doesn't look like you're trying to read an excel file as the file you are trying you specify is "data.txt" not "data.xls".
Try: library(gdata) ?read.xls HTH, Patrick -----Original Message----- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of sta_2...@spectrum.net.in Sent: Thursday, December 17, 2009 12:25 PM To: r-help@r-project.org Subject: [R] how to import data from excel to R Hi, I am using R and I want to know how data can be transferred from Excel Spread sheet to R for analyzing. I have done like this mydata<-read.table("C:\Documents and Settings\admin\Desktop\data.txt"); but its not working how can i do it regards Sarath Sankar V Spectrum Softtech Solution ______________________________________________ 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. This email message, including any attachments, is for th...{{dropped:6}} ______________________________________________ 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.