help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xlsread in Octave 3.6.4


From: Arnaud Miege
Subject: Re: xlsread in Octave 3.6.4
Date: Tue, 7 May 2013 13:04:46 +0100


On 3 May 2013 19:50, nitnit [via Octave] <address@hidden> wrote:
The JAVA_HOME enviroment var is required only for using the java sdk which is usually used to build and install the java pkg or to compile java code. If you have used the pre-compiled pkgs for mingw and you do not need to re-install a newer java pkg you do not need to set the JAVA_HOME at all !

However, this is not the cause for the io pkg failure to detect the jars upon loading. It seems that with recent io pkg (io-1.2.1) the install procedure does not install its PKG_ADD file in <octave_root>/share/octave/packages/io-121

So if you want to fix this problem in your environment before a fix will be applied to the io pkg install, you can add a text file named PKG_ADD in your <octave_root>/share/octave/packages/io-121 directory with the following code (I have taken this from io-1.0.17 which has been properly installed):

## PKG_ADD
## add paths of io pkg java jars if java pkg is installed and loaded
pkglist = pkg ("list");
javapkgind = find (cellfun(@(x) strcmp(x.name, "java"), pkglist), 1, "first");
if ~isempty (javapkgind)
  javapkg = pkglist{javapkgind};
  if javapkg.loaded
    # Assume jar files are in /lib/java and let chk_spreadsheet_support sort it out
    libdir = octave_config_info("libdir");
    spr_status = chk_spreadsheet_support ([libdir "/java"]);
  endif
endif



Philip, It seems that the missing PKG_ADD problem exist as least from io-1.0.19 !

Nitzan

Thanks, that certainly helped. Here is what I get now when I run chk_spreadsheet_support straight after starting Octave:

 >> chk_spreadsheet_support
ans =  122
>> chk_spreadsheet_support([],3,[])

Checking Excel/ActiveX/COM... not working.

Checking Java support...
  1. Checking Java JRE presence.... OK, found one.
  2. Checking Octave Java support... Java seems to work OK.
  Java (version 1.6.0_37) seems OK.
jmem =

<Java object: java.lang.Long>

  Maximum JVM memory:   248 MiB; should better be at least 400 MB!
    Hint: adapt setting -Xmx in file "java.opts" (supposed to be here:)
    D:\Octave-3.6.4\Octave3.6.4_gcc4.6.2\share\octave\packages\java-<version>\java.opts
Java support OK

Checking javaclasspath for .jar class libraries needed for spreadsheet I/O...:

Basic POI (.xls) <poi-3> <poi-ooxml>:
  - poi-3.jar OK
  - poi-ooxml-3.jar OK
  => Apache (POI) OK

POI OOXML (.xlsx) <xbean/xmlbean> <poi-ooxml-schemas> <dom4j>:
  xbean/xmlbean....jar missing
  - poi-ooxml-schemas.jar OK
  - dom4j-1.6.1.jar OK
  => Some classes for POI OOXML support missing

JExcelAPI (.xls (incl. BIFF5 read)) <jxl>:
  - jxl.jar OK
  => Java/JExcelAPI (JXL) OK.

OpenXLS (.xls (BIFF8)) <OpenXLS>:
  - openxls.jar OK
  => Java/OpenXLS (OXS) OK.

ODF Toolkit (.ods) <odfdom> <xercesImpl>:
  - odfdom.jar OK
  - xercesimpl.jar OK
  => ODFtoolkit (OTK) OK.

jOpenDocument (.ods + experimental .sxc readonly) <jOpendocument>:
  - jopendocument.jar OK
  => jOpenDocument (JOD) OK.

UNO/Java (.ods, .xls, .xlsx, .sxc) <OpenOffice.org>:
  program....jar missing
  unoil....jar missing
  jurt....jar missing
  juh....jar missing
  unoloader....jar missing
  ridl....jar missing
  => One or more UNO classes (.jar) missing in javaclasspath
Some class libs lacking yet...

ans =  122

So a lot better with the PKG_ADD file added. the Excel/ActiveX/COM is still not detected. As long as I have a working solution, I guess it doesn't really matter which mechanism xlsread uses under the hood.

Thanks,

Arnaud

reply via email to

[Prev in Thread] Current Thread [Next in Thread]