I have been using the rio package to import / export data in r
currently, I cannot export to excel. Every time I try to export a file in .xlsx, it does not give any error messages but the generated file is always a small 22 bytes and does not open.
I tried to export using openxlsx package which also produces the same corrupted file.
Any thoughts what could be wrong?
This is an example code I tried:
xx = data.frame(x=c(1,2,3,4,5), y=c(0,8,9,7,6))
rio::export(xx, "xx.xlsx")
library(openxlsx)
write.xlsx(xx, file = "xx.xlsx")
and this is my session info:
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)