Skip to content

RCOM Save

4 messages · koj, Henrique Dallazuanna, Erich Neuwirth

koj
#
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.
#
Try this;
On Thu, Apr 1, 2010 at 7:00 AM, koj <jens.koch at gmx.li> wrote:
xl[['DisplayAlerts']] <- FALSE
wkbk[['Save']] <- TRUE
xl$Quit()
xl <- NULL
gc(reset = TRUE)
#system("taskkill /f /im Excel.exe")

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

  
    
1 day later