Thomas Pujol
2007-Jul-18 16:32 UTC
[R] sqlSave, ...colnames=F, using "odbcConnectExcel" .... I still get colnames in top row of exprted sheet
I am trying to save an R data.frame as an Excel sheet. I do NOT want the column names saved into row 1. I set colnames=F. However, it still seems that the colnames are saved into row 1. Is this a bug? Or am I coding incorrectly and.or misunderstanding this feature? #example code: sheet = "c:/test2.xls" temp=data.frame(matrix(data=NA,nrow=10,ncol=15)) temp[1,1] = 'sampletext.1.1' temp[1,2] = 'sampletext.1.2' library(RODBC) odbcClose(channel) file.remove(sheet) channel <- odbcConnectExcel(sheet, readOnly=FALSE) sqlSave(channel, temp, "p", fast=FALSE,rownames=F,colnames=F) odbcClose(channel) --------------------------------- [[alternative HTML version deleted]]