openxlsx
openxlsx copied to clipboard
Note: zip::zip() is deprecated, please use zip::zipr() instead
Just a heads up in case this affects anything. The zip package pushed an update sometime in the last 24 hours, and now openxlsx::saveWorkbook() returns this note:
Note: zip::zip() is deprecated, please use zip::zipr() instead
- Version of openxlsx: 4.1.0
- Version of zip: 2.0.1
- Version of R: 3.5.2 (Windows)
I've just tested on a local copy.
Literally a one-character change in the source code (zip::zip to zip::zipr on line 544 of WorkbookClass.R) appears to work fine subsequently.
@awalker89 is there any chance of a quick fix release for this being dropped to CRAN to avoid the deprecation notices?
Hi all,
I am curious, I tried this solution on my side (with another package named officer) and it did not worked. Then I tried the PR of yanlesin (I thought I did a mistake and could reuse this solution) but got unvalid files also.
@md0u80c9 Did you tried this solution and it worked (then I have an issue) or did you just supposed it should work (then I think it does not solved the issue and this package and mine have the same issue with package zip)
I literally changed the function, rebuilt the package and it worked with the examples I threw at it without any problem (and the warning has gone).
Of course that doesn't mean that there isn't a problem and I just haven't triggered it!
thanks @md0u80c9 then I may have a local issue as on my mac, xlsx generated by this method are invalids (pptx or docx from officer as well). Sorry for disturbing :)
No worries at all! Let me know how you get on! Did you try the rebuild of this package with the change to see what happens?
yes,
After rebuilding the package I got the following file (with R command openxlsx::write.xlsx(iris, file = "coco.xlsx")) and it is invalid
Hi @davidgohel - I am using officer (version 0.3.3) and I love it. My company is ruled by ppt, so the opportunity to automatically print R output to ppt slides is saving me a lot of time. I used reporter before. Thank you for the efforts developing and supporting these packages!
In context of the thread above, when printing a ppt file using the following code:
print(x = ppt.file, target = paste0(path.deliverables, " - Batch Analysis.pptx"))
I get the message, "Note: zip::zip() is deprecated, please use zip::zipr() instead"
The ppt file is saved and I can open it. So, no critical issue. However, would be great to have it resolved. Will the officer package be updated? Or is there something else I can do to resolve the message?
Thanks!
==================== Further, I have installed R 3.5.3 and R Studio 1.1.463. The object 'ppt.file' is constructed with help of officer functions, including 'add_slide', 'ph_with_text', and 'ph_with_gg'.
@md0u80c9 , I am facing the same issue. I am new to R and do not know how to rebuild packages from source code. Can you help me with the rebuilt package that works for you?
I guess the problem is that zip and zipr assume a different root directory for the files, see the section on relative paths in the documentation. The working directory should therefore be changed as well on line 542.
It is a pitty, I still get the same problem as well. Has anyone a clear idea about how to solv this issue? P.D. The problem raises when I specify a directory path.
Hi again,
I just realized that my path is too large. Sorry for the inconvenience, the latest version (4.1.0.1) works fine. Thanks for developing such an efficient package.
The master branch continues to use zip::zip(); I would suggest to reopen this issue.
Any plans to accept the proposed PR #457?
library(openxlsx)
cat("openxlsx version", as.character(packageVersion("openxlsx")), "\n", R.Version()$version.string, "\n")
data <- data.frame(c(1,2), c("a", "b"))
write.xlsx(data, "test.xlsx")
Output:
openxlsx version 4.1.0.1
R version 3.6.1 (2019-07-05)
Note: zip::zip() is deprecated, please use zip::zipr() instead
It'd be great if PR #457 could be accepted!
Try first to define your work directory by : setwd("~/filea/fileb") then: library(openxlsx) and you will not get this problem of: "Note: zip::zip() is deprecated, please use zip::zipr() instead" when you will use : write.xlsx
Hi,
That is the old repository for this R Package.
Please use the new one:
Ok, I see. Thanks for taking care of the message.
Have a nice weekend
Julian Gaviria Neurology and Imaging of cognition lab (Labnic) University of Geneva. Campus Biotech. 9 Chemin des Mines, 1202 Geneva, CH Tel: +41 22 379 0380 Email: [email protected]
From: Philipp Schauberger [email protected] Sent: Friday, November 15, 2019 8:34:25 AM To: awalker89/openxlsx Cc: Julian Gaviria Lopez; Comment Subject: Re: [awalker89/openxlsx] Note: zip::zip() is deprecated, please use zip::zipr() instead (#454)
Hi,
That is the old repository for this R Package.
Please use the new one:
https://github.com/ycphs/openxlsx
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/awalker89/openxlsx/issues/454?email_source=notifications&email_token=AMMWC5ZZZC7AQWLAQYON3BLQTZGIDA5CNFSM4G5N3ZP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEESQ6A#issuecomment-554248312, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMMWC56K5NEY4BBHQJ4CNTTQTZGIDANCNFSM4G5N3ZPQ.