[R] problem with looping on sqlSave()
Ivan Calandra
ivan.calandra at uni-hamburg.de
Thu Feb 25 10:13:37 CET 2010
Hi!
I've tried it, but the problem is that each element has a different
size, with makes rbind() useless.
Is there then a function/package that allows appending data in an Excel
sheet?
I've searched already for a few packages, but none (except, in theory,
RODBC) can append.
Any suggestion?
Regards,
Ivan
Le 2/24/2010 19:38, Dieter Menne a écrit :
>
> Ivan Calandra wrote:
>
>> ...
>> > for (i in 1:4){
>> sqlSave(xlsFile, as.data.frame(test[[i]]), tablename="test", rownames=F,
>> addPK=T, append=T)
>> }
>> Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test,
>> : missing columns in 'data'
>> > odbcCloseAll()
>>
>>
>>
> I have never managed to write to Excel with ODBC with "append=TRUE". If you
> do not want to Access instead where this works, best is to collect (rbind)
> the data in an R data frame, and write everything in one chunk.
>
> Dieter
>
>
>
>
--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Institut und Museum
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra at uni-hamburg.de
**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php
More information about the R-help
mailing list