I am trying to use XLConnect
library in R. If I execute
library(XLConnect)
I get the following error message:
JAVA_HOME cannot be determined from the Registry
To resolve this problem I set first the JAVA_HOME
variable:
Sys.setenv(JAVA_HOME='C:/Program Files (x86)/Java/jre1.8.0_65')
library(XLConnect)
It looks like it helps me to come further but then I get another problem:
unable to load shared object 'C:/Program Files/R/R-3.2.2/library/rJava/libs/x64/rJava.dll'
It wonder why R cannot load rJava.dll
. At least this file is located in the folder where R searches for it:
C:\Program Files\R\R-3.2.2\library\rJava\libs\x64
ADDED
Please note that the rJava.dll
file exists and it is located there, where R is searching for it. I guess that the problem is in incompatibility between 32bit and 64bit versions. I assume that because R complains:
% 1 is not a valid Win32 application
Well, why do R expect it to be a Win32 application`? First, my OS is 64bit, second my Java is also for the 64bit and finally, the `rJava.dll` object is located in the folder with
x64` in the name (so, I assume it is also a 64bit version).
% 1 is not a valid Win32 application
. Of course it is not, because it is a Win64 application. So, the question is why R expects a Win32 application and how to change it? – Terramycinreadxl
instead. The package includes C and C++ libraries, and it is simpler and probably faster to use. Get the excel data out of there as quickly as possible, then do post-processing in R: this is whatreadxl
does well. – Gowrie