Error: package or namespace load failed for XLConnect

9.1k views Asked by At

I'm installing XLConnect library in R studio but, unable to do so.

I know that this package has java dependency and my R software and java both are 64 bit. Also, both have configured correctly. I have also installed rJava package before installing XLConnect. This package was working properly but, now I'm getting this error.

library(XLConnect)

ERROR: package or namespace load failed for'XLconnect':
.onload failed in loadNamespace() for XLConnect, details:
Call. System2("cat",c("/etc/*-release"), stdout =TRUE, stderr = TRUE) error: ' "cat" not found.

Please help me.

5

There are 5 answers

1
Bryce Chamberlain On

This worked for me: install prior version until they fix this at CRAN:

require(devtools)
install_version("XLConnect", version = "1.0.2", repos = "http://cran.us.r-project.org")

https://github.com/miraisolutions/xlconnect/issues/132 also recommends:

install.packages("XLConnect", type="source", INSTALL_opts = c("--no-multiarch"))
0
Nobert Ahrens On

XLConnect is still required to read xlsx-files that were created with SAP's business intelligence tool. These Excel files appear empty for readxl and openxlsx.

0
Rishabh On

Along with the above solutions, I had to use this line of code to make it work properly.

sys.setenv(XLCONNECT_JAVA_Repo_URL='https://jcenter.bintray.com')
1
user16105956 On

If still relevant, adding rtools to "path" (system environment variable) worked for me.

0
Kimera Isaac On

I have been new to R, and faced this challenge. After incorporating all the above recommendations, this is what worked for me (Windows user):

  1. install.packages("devtools")

  2. install_version("XLConnect", version = "1.0.1", repos = "http://cran.us.r-project.org")

  3. After you load JGR library (if that's your preferred GUI), then you can check the default option of XLconnect under package manager.

Thanks for your contribution.