search for: save2excel

Displaying 3 results from an estimated 3 matches for "save2excel".

2010 Dec 31
0
(no subject)
Dear Help, I am using the library RODBC to export data into an excel file with different sheets. Here is the code: library(RODBC) save2excel <- function(x, t.name,channel) { sqlSave(channel, x, tablename = t.name, rownames = FALSE) } ## Write Parameters to Excel channel <- odbcConnectExcel(paste(data.dir,"Calibrated_Parameters_Full_Set",".xls",sep=""), readOnly = FALSE) save2excel(biological.paramet...
2010 Feb 23
1
RODBC to import/export xls files
...single sheet in my xls files, which is not really named (usually sheet1, sheet2, etc), so it would be great if I could just import the 1st sheet into the dataframe. - to export I do this (from Tal Galili's solution earlier today): xlsFile <- odbcConnectExcel("file", readOnly=F) save2excel <- function(x, t.name) sqlSave(xlsFile, x, tablename=t.name, rownames=F, addPK=T) odbcCloseAll() It also works great, but how can I append lines? This function allows me to append new sheets in the file, but I would also like to append new lines of data onto one of the sheets. How can I do th...
2010 Jan 18
1
Exporting a data.frame to excel using sqlSave - adds a character ' to values
...am using RODB to export multiple data.frames into one excel file with multiple sheets. One thing I can't seem to unserdatand is way the command adds the character: ' To the beginning of each of my (non numeric) values. Here is an example code: library(RODBC) library(MASS) data(anorexia) save2excel <- function(x, t.name) sqlSave(xlsFile, x, tablename = t.name, rownames = FALSE) xlsFile <- odbcConnectExcel("C:\\output-table.xls", readOnly = FALSE) save2excel(anorexia, "temp") odbcCloseAll() So the output file has *'*Treat instead of: Treat In cell - A1 Thanks,...