【发布时间】:2020-08-19 10:20:40
【问题描述】:
我遵循了这些instructions 然后遵循了这些说明:
# Write the first data set in a new workbook
write.xlsx(USArrests, file="myworkbook.xlsx",
sheetName="USA-ARRESTS", append=FALSE)
# Add a second data set in a new worksheet
write.xlsx(mtcars, file="myworkbook.xlsx", sheetName="MTCARS",
append=TRUE)
# Add a third data set
write.xlsx(Titanic, file="myworkbook.xlsx", sheetName="TITANIC",
append=TRUE)
这是我最后所做的:
openxlsx::write.xlsx(Cost_Changes_0021_Table,'C:/Users/santi/Documents/Cost Changes xlsx/0021_Cost_Changes.xlsx', sheetName ='Dept 0021 Prod Level', row.names= FALSE, append = FALSE)
openxlsx::write.xlsx(Cost_Changes_0021_Vendor_Lvl_Table,'C:/Users/santi/Documents/Cost Changes xlsx/0021_Cost_Changes.xlsx', sheetName ='Dept 0021 Vendor Level', append= TRUE, row.names= FALSE)
我不明白为什么我在运行该脚本后没有得到多张工作表。我的代码中第二行发生的事情会覆盖第一张纸,然后当我真的想要工作簿 C:/Users/santi/Documents/Cost Changes xlsx/0021_Cost_Changes.xlsx 中的两个选项卡时,我只看到一个选项卡
【问题讨论】: