Hi Erich and Gabor, Thank you for your replies. I wanted to write *only* non-formulae cells. I have dozens of sheets with a mix of raw input (ie, no formulae) en calculated values. I want to separate this, In a later stage, I want to let R do all the calculations that with the current system are done with xls.
So I need to conditionally write the data using something like (pseudocode): if (!IsFormula(cell)) xls.write(rowno, colno, cell) (...see also the vb code below). I have to study this in more detail, but i still don't think this is possible with the rodbc package. I hope I don;t need to, but I may need to dive into COM and the excel object model. Function IsFormula(Cell As Range) As Boolean If Len(Cell.Formula) = 0 Then IsFormula = False Else IsFormula = (Left(Cell.Formula, 1) = "=") End If End Function source: http://www.triskele.com/2008/04/26/excels-missing-isformula-function Thanks again! Cheers!! Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the face of ambiguity, refuse the temptation to guess. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- On Tue, 3/9/10, Erich Neuwirth <erich.neuwi...@univie.ac.at> wrote: From: Erich Neuwirth <erich.neuwi...@univie.ac.at> Subject: Re: [R] rcom package To: r-help@r-project.org Date: Tuesday, March 9, 2010, 5:28 PM rcom allows you to access the full object model of any COM server. The object browser in Excel allows you to investigate Excel's object model. It also tells you which properties are accessible. There are a few hundreds of them. On 3/9/2010 4:35 PM, Albert-Jan Roskam wrote: > Hi, > > I would like to make a program that reads excel files, and writes the cells > of which contents is not a formula to another file. I don't think this is > possible with RODBC, but it may be possible with rcom. > > I read the documentation of the rcom package, but I was hoping somebody knows > a good web resource for more eleborate info. I tried Googling, but alas (did > you know rcom also is a kind of egg incubator? ;-). In particular, I would > like to have a list of the possible values for the 'property' argument. > > Thanks in advance! > > Cheers!! > Albert-Jan > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In the face of ambiguity, refuse the temptation to guess. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > [[alternative HTML version deleted]] > > > > > ______________________________________________ > 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. -- Erich Neuwirth, University of Vienna Faculty of Computer Science Computer Supported Didactics Working Group Visit our SunSITE at http://sunsite.univie.ac.at Phone: +43-1-4277-39464 Fax: +43-1-4277-39459 ______________________________________________ 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. [[alternative HTML version deleted]]
______________________________________________ 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.