help-octave
[Top][All Lists]
Advanced

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

Re: Windows Package


From: Martin Helm
Subject: Re: Windows Package
Date: Wed, 21 Jul 2010 21:08:28 +0200
User-agent: KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; )

Am Mittwoch, 21. Juli 2010 20:25:24 schrieb John Hudock:
> I've unloaded oct2mat, but to no effect. I've also moved the spreadsheet to
> the top directory to see if it was some naming problem because of spaces in
> the path, but no luck there either. The spreadsheet is just a simple single
> sheet spreadsheet of just data that I created just to test the octave
> function. It just contains a simple sheet of numeric data I am trying to
> read.
> 
> The problem does seem to be in the Windows package.
> 
> ============================
> 
> >>> app = actxserver ("Excel.Application");
> >>> app
> 
> app =
> 
> <COM object _Application (0x0x26dadc)>
> ============================
> 
> works, but when I try to open:
> ===============================================
> 
> >>> wb = app.Workbooks.Open ("C:\\OctaveTest.xls");
> >>>error: can't perform indexing operations for octave_com_object type
> 
> ===============================================
> 
> The problem seems to be in the assignment. If I just do the open it seems
>  to return a workbook object:
> 
> ===============================
> 
> >>>app.Workbooks.Open("C:\\OctaveTest.xls")
> 
> ans =
> 
> <COM object _Workbook (0x0x26f0ac)>
> ===============================
> 
> but trying to assign the result to a variable fails:
> 
> ===============================
> 
> >>> wb=app.Workbooks.Open("C:\\OctaveTest.xls");
> >>>error: can't perform indexing operations for octave_com_object type
> >>> wb
> >>>error: `wb' undefined near line 64 column 1
> 
> ===============================
> 
Ok, I have not much experience with the windows package (I am a linux user), 
but I think the root cause can be found somehow.

When I do the same as you posted with my own excel sheet nothing goes wrong.

octave-3.2.4.exe:1> pkg load windows
octave-3.2.4.exe:2> app = actxserver ("Excel.Application");
octave-3.2.4.exe:3> wb = app.Workbooks.Open ("C:\\Mappe1.xls");
octave-3.2.4.exe:4> wb
wb =

<COM object _Workbook (0x0x259bdc)>

octave-3.2.4.exe:5> app
app =

<COM object _Application (0x0x256084)>

Just to reduce the number of variables: I did this on Windows XP Prof. and 
Excel 2003 installed, the file Mappe1.xls is also created by Excel 2003.

Can you maybe post your test file to a place there it can be downloaded to see 
if the same problem happens when I use your file?

Which windows and excel version are you using, with which version was your 
file created?

The path works also with spaces for me, just tested it. There must be 
something different in your environment (or your file), which  triggers this 
problem.

- mh


reply via email to

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