Function File: [ retval, intfs, ljars ] = chk_spreadsheet_support ()
Function File: [ retval, intfs, ljars ] = chk_spreadsheet_support ( path_to_jars )
Function File: [ retval, intfs, ljars ] = chk_spreadsheet_support ( path_to_jars, debug_level )
Function File: [ retval, intfs, ljars ] = chk_spreadsheet_support ( path_to_jars, debug_level, path_to_ooo )

Check Octave environment for spreadsheet I/O support, report any problems, and optionally add or remove Java class libs for spreadsheet support.

chk_spreadsheet_support first checks ActiveX (native MS-Excel); then Java JRE presence, then Java support (if builtin); then checks existing javaclasspath for Java class libraries (.jar files) needed for various Java-based spreadsheet I/O interfaces. If requested chk_spreadsheet_support will try to add the relevant Java class libs to the dynamic javaclasspath. chk_spreadsheet_support remembers which Java class libs it has added to the javaclasspath; optionally it can unload them as well.

path_to_jars - relative or absolute path name to subdirectory containing these classes. TAKE NOTICE: /forward/ slashes are needed! chk_spreadsheet_support() will recurse into at most two subdir levels; if the Java class libs are scattered across deeper subdir levels or further apart in the file system, multiple calls to chk_spreadsheet_support may be required. path_to_jars can be [] or ” if no class libs need to be added to the javaclasspath.

path_to_ooo - installation directory of OpenOffice.org (again with /forward/ slashes). Usually that is something like (but no guarantees):

- Windows: C:/Program Files/OpenOffice.org or C:/Program Files (X86)/LibreOffice

- *nix: /usr/lib/ooo or /opt/libreoffice

- Mac OSX: ?????

IMPORTANT: path_to_ooo should be such that both:

1. PATH_TO_OOO/program/
  and
2. PATH_TO_OOO/ure/.../ridl.jar
resolve OK.

(Note that LibreOffice/OOo should match the bit width (32bit or 64bit) of the Java version Octave was built with.)

debug_level: (integer) between [0 (no output) .. 3 (full output]

0

No debug output is generated.

1

Only proper operation of main interface groups (COM, Java) is shown. If path_to_jars and/or path_to_ooo was supplied, chk_spreadsheet_support indicates whether it could find the required Java class libs for all interfaces.

2

Like 1, proper working of individual implemented Java-based interfaces is shown as well. If path_to_jars and/or path_to_ooo was supplied, chk_spreadsheet_support indicates for each individual Java-based interface whether it could add the required Java class libs.

3

Like 2, also presence of individual javaclass libs in javaclasspath is indicated. If path_to_jars and/or path_to_ooo was supplied, chk_spreadsheet_support reports for each individual Java-based interface which required Java class libs it could find and add to the javaclasspath.

-1 (or any negative number)

Remove all directories and Java class libs that chk_spreadsheet_support added to the javaclasspath. If debug_level < 1 report number of removed javaclasspath entries; if debug_level < 2 report each individual removed entry.

Output: retval = 0: only spreadsheet support for OOXML & ODS 1.2 and read support for gnumeric present through OCT interface, or retval <> 0: At least one read/write spreadsheet I/O interface found based on external software. RETVAL will be set to the sum of values for found interfaces:

    0 = OCT (Native Octave)
        (read/write support for .xlsx, .ods and .gnumeric)
  ----------- XLS (Excel) interfaces: ----------
    1 = COM (ActiveX / Excel) (any file format supported by MS-Excel)
    2 = POI (Java / Apache POI) (Excel 97-2003 = BIFF8)
    4 = POI+OOXML (Java / Apache POI) (Excel 2007-2010 = OOXML)
    8 = JXL (Java / JExcelAPI) (Excel 95-read and Excel-97-2003-r/w)
   16 = OXS (Java / OpenXLS) (Excel 97-2003)
  ---- ODS (OpenOffice.org Calc) interfaces ----
   32 = OTK (Java/ ODF Toolkit) (ODS 1.2)
   64 = JOD (Java / jOpenDocument) (.sxc (old OOo)-read, ODS 1.2)
  ------------------ XLS & ODS: ----------------
    0 = OOXML / ODS read/write-, gnumeric read support (built-in)
  128 = UNO (Java/UNO bridge - LibreOffice / OOs) (any format
        supported by LibreOffice/OOo)

INTFS: listing of supported spreadsheet interfaces. The OCT interface is always supported.

ljars: listing of full paths of Java class libs and directories that chk_spreadsheet_support has added to the javaclasspath.

Package: io