[R] Problems loading xlsx

Paolo Rossi
2010-11-14T20:17:17Z

Hi all,

I am trying to run the package xlsx to read Excel 2007 files and I am
getting the error below.

> library(xlsx)
Loading required package: xlsxjars
Loading required package: rJava
Error : .onLoad failed in loadNamespace() for 'xlsxjars', details:
  call: .jinit()
  error: cannot obtain Class.getSimpleName method ID
Error: package 'xlsxjars' could not be loaded

By looking up this in the mailing list I have seen that it is an error
related to the configuration of the path.
I was also made aware that the path read into R gets truncated if it is too
long. To avoid any issue I have added the jre at the very beginning of the
path - see below

> p = Sys.getenv("PATH")
> strsplit(p,";")

$PATH
 [1] "c:\\Program
Files\\Java\\j2re1.4.2_06\\bin\\client\\"
 [2] "c:\\Program
Files\\Java\\jre1.5.0_06\\bin\\client\\"
 [3]
"c:\\oracle\\ora92\\bin\\"

 [4]
"c:\\oracle\\ora92\\jre\\1.4.2\\bin\\"

 [5]
"c:\\oracle\\ora92\\jre\\1.4.2\\bin\\client\\"

 [6] "c:\\program
files\\oracle\\jre\\1.3.1\\bin\\"
 [7]
"C:\\WINDOWS\\system32"

 [8] "C:\\WINDOWS"
....

In the path variable the items have been pasted like this:
c:\Program Files\Java\j2re1.4.2_06\bin\client\;c:\Program
Files\Java\jre1.5.0_06\bin\client\;
The issue still persists.

Can you please help?

Thanks

Paolo

	[[alternative HTML version deleted]]