help-octave
[Top][All Lists]
Advanced

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

Re: csvwrite text


From: Philip Nienhuis
Subject: Re: csvwrite text
Date: Wed, 30 Mar 2011 12:45:16 -0700 (PDT)

senator wrote:
> 
> thanks... I have uninstalled and reinstalled Octave and checked the boxes
> to add packages io,windows,java
> 
> I am still haveing troulbe getting xlswrite to work, csvwrite works so i
> am not a total idiot.
> 
No one suggested you're an idiot. I'm sorry if you get this impression. And
I'm sorry that you got so much problems. Let's try to solve them....

We could try step by step, but that takes lots of time. So below you'll see
a lot of steps together. Once again, sorry if you feel overwhelmed.


> I am looking for a command to confirm that io, windows, and java are
> indeed installed. Seems like i have seen some command before like "pkg", I
> can not find the command now though.
> 
> please tell me a command to see if these packages are indeed loaded.
> 
> Please give me any other ideas you may have as to why I can't works
> xlswrite?
> 
See below.... but first some questions in return:
- What Windows version and MS-Office version have you got installed?
- Do you have Java installed? (In a CMD window, try "java -version" w/o
quotes)
- Did you install octave into a subdir with spaces in the name? (e.g.,
C;\Program Files) - that is known to cause troubles
- Did you also choose the oct2mat package? That one is also causing troubles
- Are the java and windows package loaded? To reiterate Martin Helm's
suggestions:
  * do a "pkg list" 
  * check to see that the java, windows and io packages are listed
  * check to see that the java and windows packages are loaded (there should
be an asterisk in the line, just as for the io package (which is loaded
otherwise the xlswrite command wouldn't be accepted)
  (* The windows package is not loaded automatically by default as it causes
crashes when you do "clear all" in Octave. Hopefully this bug is solved in
an octave-3.4.0-MinGW binary)
  * If one of these packages isn't loaded, do "pkg load windows" and/or "pkg
load java"
  * check to see that there's NO asterisk in the line mentioning oct2mat
(oct2mat shouldn't be listed at all, preferrably).



> DO i have to do something to make sure these packages are installed even
> after i requested them at install?
> 
Perhaps, perhaps issue "pkg load windows" command in Octave terminal. This
might be it.


> here is one of the codes i attempted:
> clear
> a=[1 4 5;2 90 7]
> b=xlswrite('jackfile.xls','a','C3:AB40')
> 
> here are some of my errors..
> 
> creating file jackfile.xls
> warning: No support for Excel .xls I/O
> error: oct2xls: unkown Excel .xls interface - None
> 

Assuming the windows & java package have been loaded, this error msg makes
me think there's some more stuff lacking:
- MS-Excel itself
     and/or
- A Java JRE  (run time environment).

Some background:
On Windows the spreadsheet scripts either need:
* ActiveX (COM), which is normally installed when you have MS-Office (esp.
MS-Excel) on your PC. In that case you'll need at least the windows package
(as that connects Octave to the ActiveX server).
     -or-
* A Java Virtual Machine (JVM) to invoke the java class libraries. The JVM
is included in a Java JRE.
(On other platforms than Windows, Java is the only choice at present.)

FYI, there's a difference between a Java JRE (Java Runtime Environment) and
a Java SDK (Software Development Kit).
To just run the spreadsheet scripts with the pre-compiled Java package in
the octave-3.2.4-MinGW binary, you'll need a JRE.
But to install the Java package (which implies compiling its source code)
you'll need the SDK. A Java SDK includes a JRE.

The spreadsheet scripts automatically find out which options there are on
your PC ("interfaces") to perform xls I/O. ActiveX is preferred (fastest),
then several Java-based solutions.
Now, from xlswrite's error messages I conclude there is neither MS-Excel nor
Java JRE found on your PC.

There's a step-by-step troubleshooting guide for the io spreadsheet stuff
contained here:
http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/io/doc/READ-XLS.html?revision=8120
(all on one line!)
in the Troubleshooting section (scroll down a bit).
Please try to follow this guide and report back where you get stuck. (That
is, if you want xlswrite to work, obviously.) It may help other people who
run into the same problem.

Philip


--
View this message in context: 
http://octave.1599824.n4.nabble.com/csvwrite-text-tp3418132p3419180.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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