help-octave
[Top][All Lists]
Advanced

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

Re: io package / odsread with UNO interface


From: PhilipNienhuis
Subject: Re: io package / odsread with UNO interface
Date: Mon, 18 Mar 2013 12:25:03 -0700 (PDT)

Stefan Mahr wrote
> Hi,
> 
> Could someone help how to use odsread correctly?

Of course I'll help you.
But before hacking around in the code itself, it may be worth to have a read
in the docs subdir of the io package - there's a file READ_ODS.html where
what I've written below is outlined in some detail.


> It basically works with this commands:
> 
>   javaaddpath("/usr/lib/ure/share/java/java_uno.jar")

No, java_uno.jar isn't needed. 
Unless it has changed since LO 4.0+ (I haven' t tested with that version
yet, but I'd wonder)


>   javaaddpath("/usr/lib/ure/share/java/juh.jar")
>   javaaddpath("/usr/lib/ure/share/java/jurt.jar")
>   javaaddpath("/usr/lib/ure/share/java/ridl.jar")
>   javaaddpath("/usr/lib/ure/share/java/unoloader.jar")
>   javaaddpath("/usr/share/libreoffice/program/classes/unoil.jar")
> 
>   pkg load io
> 
>   b=odsread("test.ods","Tabelle1","B5:C13");
> 
> 
> Furthermore, I have to remove "program" from following line in
> getodsinterfaces.m, because there is no program.jar on my system:
> 
>     entries = {"program", "unoil", "jurt", "juh", "unoloader", "ridl"};

Indeed, there is no "program.jar". Yet there is a subdirectory in the
LibreOffice / OpenOffice.org installation dir called "program" and it's that
subdir that needs to be added to the javaclasspath.
Better leave the code alone and look in the doc I mentioned.

Why don't you simply run:

chk_spreadsheet_support.m ("" , 3, "/usr/share/libreoffice")

? 
That'll set up the javaclasspath for you with some verbosity.

Please be careful hacking around in the io code, esp. the UNO routines - if
you don't know what you're doing you can easily ruin your precious data
files.

If you just need to read ods files I'd suggest using the jOpenDocument class
lib ("JOD"). It's currently in version 1.3rc1, it's GPL and it's by far the
fastest .ods interface (unless you need to read really really big files,
only then may UNO be faster).

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/io-package-odsread-with-UNO-interface-tp4650930p4650943.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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