problem with odswrite (and similar) function

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with odswrite (and similar) function

umbe1987
dear all

I have installed octave 3.8.1 on ubuntu 12.04.
I'd like to use the functionalities offered by the 'odswrite' function, but cannot get it to work.
First, I saw there is no 'odswrite' function in my /m/io folder.
So I downloaded the package and install it with:
    pkg install io-2.2.2.tar.gz
This seems to have created a new folder ('/home/umberto/octave'), with the io package and the functions I need. Nevertheless, it is not in the path, so I would have to add it with the addpath and savepath commands.
Once this is done, I still have some problems:

1) When I reload octave the added path is not loaded at startup (which I thought to be ok as I used the savepath command)

2) If I (for instance) use the 'odswrite' function (e.g. with a numeric vector A), it outputs the following error.

octave:6> odswrite ('prova01.ods', A)
Creating file prova01.ods
Detected ODS interfaces: warning:
Not all required classes (.jar) in classpath for OTK
warning:
Not all required classes (.jar) in classpath for JOD
warning:
One or more UNO classes (.jar) missing in javaclasspath
error: '__char2num__' undefined near line 52 column 10
error: called from:
error:   /home/umberto/octave/io-2.2.2/private/parse_sp_range.m at line 52, column 8
error:   /home/umberto/octave/io-2.2.2/private/__OCT_oct2spsh__.m at line 31, column 18
error:   /home/umberto/octave/io-2.2.2/oct2ods.m at line 211, column 18
error:   /home/umberto/octave/io-2.2.2/odswrite.m at line 118, column 18

Can anybody help me getting out of this? Any help would be really appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: problem with odswrite (and similar) function

PhilipNienhuis
umbe1987 wrote
dear all

I have installed octave 3.8.1 on ubuntu 12.04.
I'd like to use the functionalities offered by the 'odswrite' function, but cannot get it to work.
First, I saw there is no 'odswrite' function in my /m/io folder.
So I downloaded the package and install it with:
    pkg install io-2.2.2.tar.gz
This seems to have created a new folder ('/home/umberto/octave'), with the io package and the functions I need. Nevertheless, it is not in the path, so I would have to add it with the addpath and savepath commands.
Once this is done, I still have some problems:

1) When I reload octave the added path is not loaded at startup (which I thought to be ok as I used the savepath command)

2) If I (for instance) use the 'odswrite' function (e.g. with a numeric vector A), it outputs the following error.

octave:6> odswrite ('prova01.ods', A)
Creating file prova01.ods
Detected ODS interfaces: warning:
Not all required classes (.jar) in classpath for OTK
warning:
Not all required classes (.jar) in classpath for JOD
warning:
One or more UNO classes (.jar) missing in javaclasspath
error: '__char2num__' undefined near line 52 column 10
error: called from:
error:   /home/umberto/octave/io-2.2.2/private/parse_sp_range.m at line 52, column 8
error:   /home/umberto/octave/io-2.2.2/private/__OCT_oct2spsh__.m at line 31, column 18
error:   /home/umberto/octave/io-2.2.2/oct2ods.m at line 211, column 18
error:   /home/umberto/octave/io-2.2.2/odswrite.m at line 118, column 18

Can anybody help me getting out of this? Any help would be really appreciated.
In the io package folder there should be a subdir doc/ containing 2 files in html format. Please read the one pertaining to ods first and then come back if you have questions left.
As I'm on vacation with patchy time for Octave I cannot answer right away, hopefully someone else can help.

Philip
Reply | Threaded
Open this post in threaded view
|

Re: problem with odswrite (and similar) function

umbe1987
Dear Philip

thanks for the response.
I've been able to correctly use 'odswrite' function (which was he one I was interested in the most).
I found this link useful (you answered that question).
As I am using the io-2.2.2 package on octave 3.8.1, I also workaround the problem of having my values written in a ods file w/o specifying the 'range' arg in the function by adding the needed '.jar' to the java path and invoking 'jod' as interface in the final argument.

Thanks again for the support and enjoy your holiday

    umberto
Reply | Threaded
Open this post in threaded view
|

Re: problem with odswrite (and similar) function

Philip Nienhuis
umbe1987 wrote
Dear Philip

thanks for the response.
I've been able to correctly use 'odswrite' function (which was he one I was interested in the most).
I found this link useful (you answered that question).
As I am using the io-2.2.2 package on octave 3.8.1, I also workaround the problem of having my values written in a ods file w/o specifying the 'range' arg in the function by adding the needed '.jar' to the java path and invoking 'jod' as interface in the final argument.
For the JOD interface (and any interface except OCT) the cell range argument works fine, also with empty ranges.
It didn't work for the OCT interface but yesterday night I fixed that bug.
Note that the JOD interface (Java based) is *much* faster than OCT (native Octave); that is because .ods is a fairly complicated file format compared to e.g., .gnumeric and .xlsx

BTW I've tested the new jOpenDocument-1.4rc1.jar some weeks ago and that works fine with the test routines I have.

Philip