[R] RCOM Save

Erich Neuwirth erich.neuwirth at univie.ac.at
Thu Apr 1 15:33:23 CEST 2010


Please be more precise.
You seem not to use the rcom (note the lowercase name) package,
but the RDCOMClient package which is not available from CRAN
but as part of the Omegahat project.

rcom has a command comCreateObject and RDCOMClient has a command COMCreate.

The code you supplied will definitely not run in with rcom.
Furthermore, if your code had included the appropriate
library statement, things would have been much clearer.


On 4/1/2010 12:00 PM, koj wrote:
> 
> Thank you. Unfortunately this recommendation does not solve my problem and I
> don't know why. Here is my test-code:
> 
> 
> pfad<-paste("C:/...","xls",sep=".")
> xl <- COMCreate("Excel.Application")  
> xl[["Visible"]] <- FALSE                     
> wkbk <- xl$Workbooks()$Open(pfad)       
> sh <- xl$ActiveSheet()
> A3R <- sh$Range("A28")
> A3R[["Formula"]] <- "=Summe(A1:A27)"
> A3RF <- A3R$Font()
> A3RF[["Bold"]] <- TRUE
> wkbk$Close(pfad)
> system("taskkill /f /im Excel.exe")
> 
> I tried a lot of possibilities (e. g. in the close statement) but without
> success. Excel always asks about the saving.

-- 
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



More information about the R-help mailing list