[R] howto import .xls and .ods

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri May 2 08:35:37 CEST 2008


There is a *manual* on R Data Import/Export, not just an FAQ.

This is the first request I have seen for .ods (whatever that is -- please 
don't assume that a file type is determined by an extension, and we not 
infrequently get asked about CSV files with extension .xls).

On Thu, 1 May 2008, Abhijit Dasgupta wrote:

> I've written a little python script that converts ods and xls to csv, and a 
> wrapper in R that imports a sheet of the ods and/or xls into a data.frame in 
> R. If this is a FAQ and there is an existing solution, great.
>
> Actually, for xls, the library gdata has a read.xls function that uses a perl 
> function underneath.
>
> Abhijit Dasgupta, Ph.D
> Assistant Professor | Division of Biostatistics
> Dept of Pharmacology and Experimental Therapeutics | Thomas Jefferson 
> University
> 1015 Chestnut St | Suite M100 | Philadelphia PA 19107
> Ph: (215) 503-9201 | Fax: (215) 503-3804
> adasgupt (at) mail (dot) jci (dot) tju (dot) edu
> ------------------------------------------------------------------------
> The documents accompanying this transmission may contain confidential health 
> or business information. This information is intended for the use of the 
> individual or entity named above. If you have received this information in 
> error, please notify the sender immediately and arrange for the return or 
> destruction of these documents.
> ------------------------------------------------------------------------
>
>
> Jonas Stein wrote:
>> Hi,
>> 
>> i want to import data from .ods and .xls files in R on a linux system.
>> Seems it was a faq in the past, but i found only solutions for Windows.
>> 
>> Is there a handy solution for linux? The best would be something like
>> 
>> mytab <-read.ods(...)
>> 
>> Any hints? Thanks a lot for reading so far,
>> 
>> 
>
> ______________________________________________
> R-help at 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.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list