search for: comcreateobject

Displaying 13 results from an estimated 13 matches for "comcreateobject".

2007 Dec 14
4
rcom close Excel problem
...cel.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",&qu...
2012 Mar 31
3
clear console
...update the version of R from 2.14 to 2.15, it doesn't work. cls <- function (t) { require(RDCOMClient) wsh <- COMCreate("Wscript.Shell") wsh$SendKeys("\f") invisible(wsh) } cls() or cls <- function() { require(rcom) wsh <-comCreateObject("Wscript.Shell") comInvoke(wsh, "SendKeys", "\f") invisible(wsh) } cls() Can anybody help me to solve this problem? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/clear-console-tp4521532p4521532.html Sent from the R help mailing list arch...
2009 May 03
2
clear screen?
I?ve been using this routine for several years. I?m sorry, I don?t remember where I got it. It works as it should, viz. it blanks the R console. But it requires package rcom and now that requires rscproxy. cls <- function () { require(rcom) wsh <- comCreateObject("Wscript.Shell") comInvoke(wsh, "SendKeys", "\f") invisible(wsh) } > cls() Loading required package: rcom Loading required package: rscproxy This seems like overkill to me just to blank the R console, especially since I am trying to diminish the number of...
2007 Dec 27
0
SAS to R - if you have SAS 8.2+
...Gulyas (gyula.gulyas at timberline.ca) # Use as is, no guarantees, liability due to data loss is limited to the price you paid for this function... require(rcom) # check if user has closing slash in path and fix it if needed inPath <- sub("/$","",inPath) obWSM <- comCreateObject("SASWorkspaceManager.WorkspaceManager") obWSM.Workspaces <- obWSM[["Workspaces"]] obSAS <- comCreateObject("SAS.Workspace") obSAS.DataService <- obSAS[["DataService"]] obSAS.LanguageService <- obSAS[["LanguageService"]] # hard-code...
2010 Apr 29
1
UpdateLinks = FALSE
...ned, a menu pops up asking if I want to update the links. I never want to update the links. I used the macro recorder to see what code would be needed to suppress that message, but to no avail (I tried more variations, but one attempt is shown below). How can I suppress such messages?   excel <- comCreateObject("Excel.Application") wb <- comGetProperty(excel, "Workbooks") comSetProperty(wb, "UpdateLinks", FALSE) owb <- comInvoke(wb, "Open", xlsfile) # at this point, it's too late Another query: the program at large erases any cells that contain formulae....
2009 Aug 18
2
(no subject)
...th the Iris data, which worked Any idea? Thanks, Lars > path<-"I:/subProjects/bh/HPGD/" > > setwd(path) > > xls <- "Platten_Liste_090421.xls" > > xlsfile <- file.path(path,xls) > > file.exists(xlsfile) [1] TRUE > > > > oxl <- comCreateObject("Excel.Application") > > comSetProperty(oxl, "Visible", TRUE) NULL > > owb <- comGetProperty(oxl, "Workbooks") > > ob <- comInvoke(owb, "Open", xlsfile) > > osheets <- comGetProperty(ob, "Worksheets") > > n &lt...
2006 Sep 29
3
control L to clear the Rgui screen in Windows
Greetings R-ians: Searching the Searchable Mail Archives I discovered that ctrl L will clear the Rgui screen, which is what I'd like to do from a print (or some similar) statement. Is there a mechanism to use the ctrl L clear-screen sequence in a script, or print statement? Thanks for your counsel. Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com phone: 561-352-9699 eFax:?
2006 Mar 11
6
is there a formatted output in R?
something like "sprintf" in C? so I can do: print(sprintf("the correct result is %3.4f\n", myresult)); ------- Also, I am desperately looking for a "clear console screen" function in R... thanks a lot! [[alternative HTML version deleted]]
2006 Jan 26
0
XML Request in R: Pointers/examples needed
...not sure about the second one) 2- How do I get them to work in R? I'm a loss with the first one. As for the second one, I suspect I would have to use the rcom or R(D)COM packages but I do not understand what I should do once I have established the COM object. (example: library(rcom) comCreateObject("MSXML2.XMLHTTP.3.0") Any pointers/examples would be appreciated. #### Script #1 Logon Request##################################### <?xml version="1.0"?> <ds:Requests xmlns:ds="http://product.datastream.com/zappy/dsxml_1_0" xmlns:xsi="http://www.w3.or...
2008 Aug 27
0
Com Object mystake
Hi, I've some problem to close a com Object that I've open. example : I create the Com Object Excel : fxl = comCreateObject("Excel.Application") To close I normally used gc(verbose = FALSE) -> silent This is ok with my first Pc, the Com Object Excel is kill, but for my second computer this do nothing ... ? I've you an idea of the reason why the gc(verbose = FALSE) -> silent don't close my c...
2009 Sep 15
0
chinese character support issue of rcom
...ear Sir, rcom is a great package of R. Yet it seems that there is some problem of Chinese character supporting. comGetPropery() always get the part of the Chinese character. Any suggestion would be appreciated. Thanks. Michael > library(rcom) Loading required package: rscproxy > txe<-comCreateObject("Excel.Application") > comSetProperty(txe,"Visible",TRUE); NULL > newwb <- comInvoke(comGetProperty(txe,"Workbooks"),"Add") > ws <- comGetProperty(newwb,"Worksheets",1) > e<-comGetProperty(ws,"Range","A1") &g...
2009 Mar 12
1
read.xls and name of worksheet
Hi, I would like to some excel files with some worksheets. I tried this with the following R script: library(gdata) i<-1 rc<-0 while(rc != "try-error") { wksh<-try(read.xls("cluster-microarray-FW.xls",sheet=i,verbose=TRUE,perl="perl")) rc<-class(wksh) print(sprintf("------- i=%2d rc=%s ---------------",i,rc)) if (rc !=
2009 May 05
1
self organizing map advice for categorical data
...en using this routine for several years. I?m sorry, I don?t remember > where I got it. It works as it should, viz. it blanks the R console. But > it requires package rcom and now that requires rscproxy. > > cls <- > function () > { > require(rcom) > wsh <- comCreateObject("Wscript.Shell") > comInvoke(wsh, "SendKeys", "\f") > invisible(wsh) > } > >> cls() > Loading required package: rcom > Loading required package: rscproxy > > This seems like overkill to me just to blank the R console, especially...