Ajay Shah
2008-Mar-07 11:17 UTC
[R] Reading microsoft .xls format and openoffice OpenDocument files
1. I have used gdata::read.xls() with much happiness. But every now and then it breaks. I have not, as yet, been able to construct a mental model about the class of .xls files for which it works. Does someone have a simple rule for predicting the circumstances under which it will work? 2. Just like there is a read.xls(), it'd be great if we have a read.ods() which directly reads files from openoffice. This should be easier than grokking Microsoft formats given that openoffice is gpl. I hunted a bit and couldn't find any. Does someone know how we might approach this? Am I correct in thinking that our goal is reading OpenDocument files (http://en.wikipedia.org/wiki/OpenDocument) ? -- Ajay Shah http://www.mayin.org/ajayshah ajayshah at mayin.org http://ajayshahblog.blogspot.com <*(:-? - wizard who doesn't know the answer.
Liaw, Andy
2008-Mar-10 15:29 UTC
[R] Reading microsoft .xls format and openoffice OpenDocument files
I don't have answer to either of your questions, just some info: 1: Why not try the XLSReadWrite package that can do it natively without using Perl to convert to CSV first? 2: There seems to be an Ooo extension that sounds similar to R-Excel (connecting R to Calc). Not sure if that helps you any though. Andy From: Ajay Shah> > 1. I have used gdata::read.xls() with much happiness. But every now > and then it breaks. I have not, as yet, been able to construct a > mental model about the class of .xls files for which it works. Does > someone have a simple rule for predicting the circumstances under > which it will work? > > 2. Just like there is a read.xls(), it'd be great if we have a > read.ods() which directly reads files from openoffice. This should > be easier than grokking Microsoft formats given that openoffice is > gpl. I hunted a bit and couldn't find any. Does someone know how we > might approach this? > > Am I correct in thinking that our goal is reading OpenDocument > files (http://en.wikipedia.org/wiki/OpenDocument) ? > > -- > Ajay Shah > http://www.mayin.org/ajayshah > ajayshah at mayin.org > http://ajayshahblog.blogspot.com > <*(:-? - wizard who doesn't know the answer. > > ______________________________________________ > 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. > > >------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachme...{{dropped:15}}
Gabor Grothendieck
2008-Mar-10 16:15 UTC
[R] Reading microsoft .xls format and openoffice OpenDocument files
With regards to #1 you could also check out http://tolstoy.newcastle.edu.au/R/help/06/04/25674.html On Fri, Mar 7, 2008 at 7:17 AM, Ajay Shah <ajayshah at mayin.org> wrote:> 1. I have used gdata::read.xls() with much happiness. But every now > and then it breaks. I have not, as yet, been able to construct a > mental model about the class of .xls files for which it works. Does > someone have a simple rule for predicting the circumstances under > which it will work? > > 2. Just like there is a read.xls(), it'd be great if we have a > read.ods() which directly reads files from openoffice. This should > be easier than grokking Microsoft formats given that openoffice is > gpl. I hunted a bit and couldn't find any. Does someone know how we > might approach this? > > Am I correct in thinking that our goal is reading OpenDocument > files (http://en.wikipedia.org/wiki/OpenDocument) ? > > -- > Ajay Shah http://www.mayin.org/ajayshah > ajayshah at mayin.org http://ajayshahblog.blogspot.com > <*(:-? - wizard who doesn't know the answer. > > ______________________________________________ > 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. >
Gregory Warnes
2008-Mar-10 19:33 UTC
[R] Reading microsoft .xls format and openoffice OpenDocument files
Hello Ajay, I'm the author of the gdata package. If you send me a copy of an .XLS file that doesn't work with read.xls(), I'll see about fixing the code. -Greg On Mar 7, 2008, at 6:17AM , Ajay Shah wrote:> 1. I have used gdata::read.xls() with much happiness. But every now > and then it breaks. I have not, as yet, been able to construct a > mental model about the class of .xls files for which it works. Does > someone have a simple rule for predicting the circumstances under > which it will work? > > 2. Just like there is a read.xls(), it'd be great if we have a > read.ods() which directly reads files from openoffice. This should > be easier than grokking Microsoft formats given that openoffice is > gpl. I hunted a bit and couldn't find any. Does someone know how we > might approach this? > > Am I correct in thinking that our goal is reading OpenDocument > files (http://en.wikipedia.org/wiki/OpenDocument) ? > > -- > Ajay Shah http://www.mayin.org/ > ajayshah > ajayshah at mayin.org http:// > ajayshahblog.blogspot.com > <*(:-? - wizard who doesn't know the answer. > > ______________________________________________ > 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.
Bio7
2008-Mar-11 15:41 UTC
[R] Re ading microsoft .xls format and openoffice OpenDocument files
"2. Just like there is a read.xls(), it'd be great if we have a read.ods() which directly reads files from openoffice. This should be easier than grokking Microsoft formats given that openoffice is gpl. I hunted a bit and couldn't find any. Does someone know how we might approach this?" Well, this can be realized e.g. with the OpenOffice API and Java (the rJava package: http://rosuda.org/rJava/). As far as i know the API can also be accessed from C++ and Python. I successfully use the OpenOffice APi (from Java) with Rserve to get and send data from or to the OpenOffice calc tool (Windows, Linux). The OpenOffice API itself and its use is good documented here: http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html -- View this message in context: http://www.nabble.com/Reading-microsoft-.xls-format-and-openoffice-OpenDocument-files-tp15894814p15976690.html Sent from the R help mailing list archive at Nabble.com.