Re: [R] rcom close Excel problem

From: Gyula <gygulyas_at_gmail.com>
Date: Fri, 14 Dec 2007 21:51:21 -0800 (PST)

First, you will likely have to use Ctrl-Alt-Delete - Task Manager - to kill the Excel processes.

you could also try

 wb[["Saved"]]<-TRUE # trick Excel to think that the workbook is saved
 x$Quit() # close Excel
 rm(list=ls()) # remove all objects attached to environment

Gyula

On Dec 14, 11:58 am, stephen bond <sten..._at_go.com> wrote:
> Hello,
>
> I just discovered that I cannot close the Excel application and task
> manager shows numerous copies of Excel.exe
>
> I tried both
>
> x$Quit() # shown in the rcom archive
>
> and
>
> x$Exit()
>
> and Excel refuses to die.
> Thank you very much.
> S.
>
> "You can't kill me, I will not die" Mojo Nixon
>
> I also have a problem with saving. It produces a pop-up dialog and
> does
> not take my second parameter:
>
> x<-comCreateObject("Excel.Application")
> wb<-comInvoke(comGetProperty(x,"Workbooks"),"Open","G:
> /MR/Stephen/repo.
> xls", "0")
> sh<-comGetProperty(wb,"Worksheets","Market Data")
> range1 <- comGetProperty(sh,"Range","C10","I11")
> vals <- comGetProperty(range1,"Value")
> comInvoke(wb,"Close","G:/MR/Stephen/repo.xls","True") # True is
> ignored
>
> Thank you All.
> Stephen
>
> ______________________________________________
> R-h...@r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



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. Received on Sat 15 Dec 2007 - 08:35:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 15 Dec 2007 - 09:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.