Problem with loading XLConnect

Hello, I was able to successfully install the XLConnect package but I'm getting an error message when I tried to load the package. I am new to learning R and I will really appreciate some assistance. Below is the code chunk of the error message I'm getting (FYI: I also tried installing XLConnectJars with a previous attempt but loading the packages still is not working). Thank you in advance for taking the time to review and respond to my request.

Error Message:

Loading required package: XLConnectJars
Error: package or namespace load failed for ‘XLConnectJars’:
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: fun(libname, pkgname)
  error: JAVA_HOME cannot be determined from the Registry
Error: package ‘XLConnectJars’ could not be loaded
1 Like

The XLConnect :package: has a JAVA dependency that is not easy to deal with. You need to have JAVA properly installed to get things work. Currently, according to your error message, JAVA is not correctly setup, hence rJava is not working.

To work with excel, you have now some :package: without java dependency. I would recommend to use those to limit issues. Java is a pain !

See also this other answer

3 Likes

I would add tidyxl to this list as well - very useful functionality there related to reading formatting as well.

3 Likes

Much thanks for the speedy response and the R package(s) suggestions in terms of working with Excel files. Thanks again and I look forward to your input down the road.

I am truly grateful for your input. I will explore the/ work with the suggested packages when handling Excel files.

I had same problem and this comments helped me to resolve the problem. Thank you so much.

I have installed Java but still i faced problem. After doing so much search i realized that both R programming and Java has to be same architecture(ex: 32 bit or 64 bit).

I have installed 64 bit java software later i was able to use XLConnect package.