[R] Questions to RDCOMClient
Dr. Michael Wolf
m-wolf at muenster.de
Tue Apr 25 20:07:01 CEST 2006
Dear list members,
I'm using R in connection with the RDCOMClient and Excel. The more I use the
package, the more I'm fascinated of it. The possibilities of R can be
brought together with the necessities of outputing my socio-economical
research results in MS Office!
But I have some special questions concering the use of RDCOMClient and
perhaps you can help me solving them:
1. Problems with closing the COM-applications
My R procedure structure looks as follows:
# loading the packages
source(system.file("examples", "excelUtils.r", package="RDCOMClient"))
# opening the Excel file
dnXls <- paste(pfArb, "/RVP#StO-Analyse_VersVerw.xls", sep="") #
Xls-Dateiname + Pfad
xls <- COMCreate("Excel.Application")
sh <- xls$Sheets("Tab.1")
::: [ here is comming R code in order to produce output like tables,
thematical map charts and
::: transfering them to Excel via RDCOMClient / everything is working
fine!!! ... ]
# 'shutting down' Excel
xls[["Visible"]] <- TRUE
The same way is used by serveral examples in the package. So far so fine!
But sometimes when I try to open the Excel file afterwards from the MS
Explorer, Excel seems to open but didn't show the file I clicked to open.
When opening the task manager I offen can find a Excel process running -
even if I closed Excel with the procedure above and didn't try to reopen
Excel via MS Explorer. What's going wrong in my procedure? Why the Excel
process isn't finished?
2. RDCOMCLient and Windows 98
At home I'm sometimes using my old computer with Windows 98 and Excel 2000
(that may seem funny to manny of yours but I use my old "babe" for Internet
surfing and sometimes I have to run some R procedure!). When trying to use
this operating system in connection with RDCOMCLient I get a warning message
that the DLL tries to change a FPU control word from 8001f to 9001f (this is
the English translation of the German message!). I set the path to %R_HOME%
and also the variable R_HOME to the bin dicertory of R in the autoexec.bat
file. So why doesn't RDCOMCLient run? Does this package work together with
Windows 98 or did I forget some steps when installing the RDCOMClient
package? (Please don't send any answers that I should use a computer with a
new OS. I still do - mostly!)
3. RDCOMCLient and Excel Manual
Do you know a good overview of using Excel VBA code via RDCOMClient (e. g.
sh$Select())? Are there people interesting in working out such a paper? I
could contribute some experiences of my work to such a project (e. g.
deleting Excel shapes from R and copying new charts made by R to a special
position in a Excel sheet.
Thanks to you and your hints in advance!
Greetings from Germany
Dr. Michael Wolf
Von-Schonebeck-Ring 18 48161 Münster
E-Mail: m-wolf at muenster.de
More information about the R-help