Hey.

I am trying to append a sheet to an existing file using write.xlsx, see
code under:

write.xlsx(x = data1,file = filename,sheetName = "data1", asTable = FALSE,
col.names = T,row.names = F,append = F)
write.xlsx(x = data2,file = filename,sheetName = "data2", asTable = FALSE,
col.names = T,row.names = F,append = T)

However, when using the last line does it not append it to the file, but
overwrite the file. Meaning that the file, which I have have called:

filename <- "test.xlsx"

only includes one sheet - data2. The first data sheet is not there. Why
does not append work with write.xlsx?

Paul

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to