You could use RDCOMClient or rcom packages to update an Excel
spreadsheet in place and you would not need any VBA at all. Search
through the archives for the keyword Excel.Application .
On 3/27/07, Moshe Olshansky [EMAIL PROTECTED] wrote:
OK.
By the way, I only thought that I could do what I
: Saturday, 24 March 2007 3:44 AM
To: Moshe Olshansky
Cc: R Help
Subject: Re: [R] Updating a worksheet in Excel file using RODBC
Hi,
2007/3/23, Moshe Olshansky [EMAIL PROTECTED]:
Hello!
I have no problem reading Excel files (each worksheet in the file is
a table which can be read - at least in my
Dear Prof. Ripley,
You seem not to have tried the simplest possible option. The following
works for me (beware of wrapped lines from mailers)
chan - odbcDriverConnect(DRIVER=Microsoft Excel Driver
(*.xls);DBQ=C:\\bdr\\hills.xls; ReadOnly=False)
sqlSave(chan, USArrests, tests, fast=TRUE) # or
Yes, sqlDrop does not work correctly for Excel worksheet names (and there
are other quirks).
As I said in another message, it is on my TODO list to make this work
better, but in the absence of good documentation of what the Excel ODBC
driver should do and several with known bugs it is largely
OK.
By the way, I only thought that I could do what I wanted!
It worked once but then it failed. When I was trying to update an existing
sheet I got an error message saying that it existed and when I was trying to
make a new sheet (something that worked once) I got a message saying that there
Hello!
I have no problem reading Excel files (each worksheet in the file is a table
which can be read - at least in my case).
What I would like to do is to read such a table, change it (just the contents,
not the format) and write it back, and this I can not do. I am getting the
following
The problem is that way the ODBC driver exposes table names is not valid
SQL, and nor is the way quoting has to be used. You can get around this
via direct SQL sent by sqlQuery. In addition, by default the Excel ODBC
driver gives you read-only access to worksheets.
Searching the list
On Fri, 23 Mar 2007, Prof Brian Ripley wrote:
The problem is that way the ODBC driver exposes table names is not valid
SQL, and nor is the way quoting has to be used. You can get around this
via direct SQL sent by sqlQuery. In addition, by default the Excel ODBC
driver gives you read-only
Hi,
2007/3/23, Moshe Olshansky [EMAIL PROTECTED]:
Hello!
I have no problem reading Excel files (each worksheet in the file is
a table which can be read - at least in my case).
What I would like to do is to read such a table, change it (just the
contents, not the format) and write it back, and