[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: run Octave from Excel
From: |
Tom Weichmann |
Subject: |
Re: run Octave from Excel |
Date: |
Wed, 29 Oct 2003 23:50:49 -0800 |
User-agent: |
KMail/1.5.1 |
There may be a prettier way to do this, but unfortunatelymost of my Octave on
windoes experiences have told me that things usually end up ugly when trying
to interface native Windows and Octave/Cygwin.
What I would probably do is create a .bat file which would look somewhat like
the .bat which starts octave, but instead have it call octave and your .m
file that you are trying to run. after you have created your .bat file you
can create a .pif to that .bat. Right click on the .pif and goto properties
and tell it to run minimized. Then you will not see the octave window
either!!
I have never looked at the latest and greatest 'Octave for Window' package,
but in the original package that I did a few years back, I could not just run
'C:\Program Files\GNU Octave\bin\octave-2.1.42-p2atlas.exe' like you are
trying to call. That is the reason that the Octave screen just flashed by.
Octave for Windows is based on a Unix API layer called Cygwin. Without it
Octave can not run, and I think that is what is happening to you. That
window probably says something about 'Can not find Cygwin.dll' Go and look
at what exactly you launch when you click on the Octave Icon. I bet that it
is either a .pif or a .bat. A few env vars have to be set and so forth. Use
that .bat as a model for the one that you write and call from Excel.
Hope this helps,
Tom Weichmann
On Wednesday 29 October 2003 01:54 pm, albert treblataf wrote:
> Sorry to ask what is probably a simple question, I would like to run an
> octave script from a microsoft excel macro. The script runs a couple of
> functions and saves the results in a text file without printing any results
> in the octave window. I can get octave to open using a shell command in my
> excel macro, but can't get it to open and run my script. my code runs as
> follows: shell("C:\Program Files\GNU Octave\bin\octave-2.1.42-p2atlas.exe
> -testscript.m") Octave opens for half a second and then closes again
> without running the script. Also would it be possible to run my script
> without the octave window being visible? I am running Octave in windows
> any help will be gratefully received.
>
> Albert
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Exclusive Video Premiere - Britney Spears
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------