zipping up workbook failed. make sure tool is installed or zip application is available to R

不想你离开。 提交于 2019-12-08 11:33:40

问题


I am working with xlsx files and I want to create a Excel file but it failed. I am using openxlsx package. My code is given bellow.

 wb=createWorkbook()
 addWorksheet(wb,"first")
 writeData(wb,"first","Roll no",startCol = 1,startRow = 1)
 writeData(wb,"first","Name",startCol = 2,startRow = 1)
 writeData(wb,"first","1",startCol = 1,startRow = 2)
 writeData(wb,"first","alvi",startCol = 2,startRow = 2)
 saveWorkbook(wb,"first.xlsx",overwrite = TRUE)

but i have found this error.

Error: zipping up workbook failed. Please make sure Rtools is installed or a zip application is available to R.
         Try installr::install.rtools() on Windows. If the "Rtools\bin" directory does not appear in Sys.getenv("PATH") please add it to the system PATH 
         or set this within the R session with Sys.setenv("R_ZIPCMD" = "path/to/zip.exe")

what should I do? is there any other way to do this same work ??

来源:https://stackoverflow.com/questions/47323832/zipping-up-workbook-failed-make-sure-tool-is-installed-or-zip-application-is-av

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!