if (FALSE) {
writeSeq(SeqList, OutFormat="xls", file="MyFile.xlsx")
# add additional sheet to the excel file:
library(openxlsx)
wb <- loadWorkbook("MyFile.xlsx")
addWorksheet(wb, sheetName = "ExtraData")
writeData(wb, sheet = "ExtraData", MyData, rowNames=FALSE)
saveWorkbook(wb, "MyFile.xlsx", overwrite=TRUE, returnValue=TRUE)
# or: (package requires java & is trickier to install)
xlsx::write.xlsx(MyData, file = "MyFile.xlsx", sheetName="ExtraData",
col.names=TRUE, row.names=FALSE, append=TRUE, showNA=FALSE)
}
Run the code above in your browser using DataLab