Export R objects to excel

Hi everyone! I hope someone knows how to solve my problem! I have to export my analysis from R to Excel. I installed the package "xlsx" as I read and installation was successfull. However, when I have to work with the package and I type library, R gives me the following error. How can I solve the problem?
Thanks!

library(xlsx)
Error: package or namespace load failed for ‘xlsx’: .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry

This package needs installed java, even when it is installed sometimes it is not found by R, generating a lot of trouble.
Honestly I would suggest to use the "writexl" librarary, that works fine.

PS: i guess xlsx can do both reading and writing, for reading (in combination with writexl) you can use readxl)

2 Likes

openxlsx is an alternative which has no Java dependencies:

2 Likes

I did it and it worked, thank you so much!

Already done with writexl, but thanks anyway!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.