[R] Problems loading xlsx

jim holtman jholtman at gmail.com
Mon Nov 15 01:12:40 CET 2010


If you are running on WIndows, I would suggest that you use the RODBC
package  and the "odbcConnectExcel2007" function.  I have had
reasonable success with this.

On Sun, Nov 14, 2010 at 3:23 PM, Paolo Rossi
<statmailinglists at googlemail.com> wrote:
> 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]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?



More information about the R-help mailing list