How do I append data from a data frame in R to an Excel sheet that already exists

后端 未结 2 1607
执念已碎
执念已碎 2020-12-11 03:41

I have created dozens of data frames in R and would like to append them all to one sheet in an Excel file.

Here are two of the pages I have looked at in an attempt

2条回答
  •  庸人自扰
    2020-12-11 04:25

    To get around the original error that you mentioned:

    Error in sheet$getWorkbook : $ operator is invalid for atomic vectors

    You can try this:

    wb <- loadWorkbook("")
    addDataFrame(df,getSheets(wb)$, startRow = 712)
    saveWorkbook(wb, )
    

提交回复
热议问题