---------- Forwarded message ---------- From: John C Frain <[EMAIL PROTECTED]> Date: 18-Apr-2007 22:35 Subject: Re: [R] importing excel-file To: Alberto Monteiro <[EMAIL PROTECTED]>
One additional suggestion would be to use gretl. Gretl will read excel files with an option to possibly ignore the first few rows and columns and then the data can be exported to an R session started from within Gretl. This will also work in both Windows and Linux. I find it hard to imagine an excel file that can not be read in Open Office or Gnumeric or even Excel and then output to a delimited file in a matter of seconds. In my previous employment I conducted several campaigns against the use of excel formats in favour of a delimited file which can be opened in almost any program. I think that we wouls all be better off if this practice was more widespread. John Frain On 18/04/07, Alberto Monteiro <[EMAIL PROTECTED]> wrote: > John C Frain wrote: > > > > To avoid complications, save your file as comma separated and use one > > of the instructions for reading delimited files. If you are using a > > comma as a decimal point you are probably using ; as a separator. If > > this is so use read.csv2. Please see the help files for read.table. > > > I think the problem is that we _can't_ alter or write the excel > file, or it would be unpractical to do it (say, this xls file > is generated by someone else once a day, and we must use it). > > I usually save the excel file to plain text, and then read it - but > this is not the best solution when the file keeps changing. > > Alberto Monteiro > > -- John C Frain Trinity College Dublin Dublin 2 Ireland www.tcd.ie/Economics/staff/frainj/home.html mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -- John C Frain Trinity College Dublin Dublin 2 Ireland www.tcd.ie/Economics/staff/frainj/home.html mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ______________________________________________ R-help@stat.math.ethz.ch 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.