ropensci / c14bazAAR

R Package - Download and Prepare C14 Dates from Different Source Databases
https://docs.ropensci.org/c14bazAAR
GNU General Public License v2.0
30 stars 12 forks source link

openxlsx reading issues #105

Closed nevrome closed 4 years ago

nevrome commented 4 years ago

openxlsx seems to have problems with reading some files (see https://github.com/ycphs/openxlsx/issues/96).

One solution would be to read these files with the readxl package. That requires downloading the files to a tempdir first. If we use readxl I would suggest to replace openxlsx also in these instances where it works right now. So we should switch out openxlsx with readxl everywhere to keep the number of dependencies low.

dirkseidensticker commented 4 years ago

@nevrome as I got no comment on my issue https://github.com/ycphs/openxlsx/issues/96 by now, I will switch our codebase from openxlsx::read.xlsx() to readxl::read_excel()

nevrome commented 4 years ago

Excellent - thank you. I hope it's not too much work and goes smoothly.

dirkseidensticker commented 4 years ago

Noticed that readxl can only read, but not write xlsx files; which we offer in c14bazAAR::write_c14(). This might be the reason why we switched to openxlsx. The readxl website promotes the writexl package for writing xlsx files. Thus we would need to trade one package for two. But as readxl is part of tidyvers and writexl part of ropensci, we might see better support. @nevrome what do you think?

nevrome commented 4 years ago

Ja - let's go for readxl and writexl. The latter can go to the Suggests only and we can catch it with check_if_packages_are_available() in write_c14().