[R] problem with looping on sqlSave()
Dieter Menne
dieter.menne at menne-biomed.de
Wed Feb 24 19:38:10 CET 2010
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
--
View this message in context: http://n4.nabble.com/problem-with-looping-on-sqlSave-tp1567601p1567872.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list