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
library(RDCOMClient)
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")
xls[["Workbooks"]]$Open("c:\tmp\test.xls)
sh <- xls$Sheets("Tab.1")
sh$Select()
::: [ 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
xls[["Workbooks"]]$Close()
xls$Quit()
rm(list=c("xls", "sh"))
gc()
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
Tel.: 02533/2466
E-Mail: m-wolf at muenster.de