Hello,
I have a Matlab program that I am trying to run in Octave. While the
majority of my program runs smoothly, I'm having a few problems with the COM
interface. I have installed both the i/o and windows packages, and my
program runs fine with the few trouble lines commented out.
The problem is basically that I can read from the Excel file, but I can't
write any data back.
For example, this line of code works fine:
storageName = infoSheet.Range('B7').Value;
However, when I want to write the same variable to a different worksheet in
the same workbook (yes, I created a handle to the worksheet already), the
following line causes an error:
addInfoSheet.Range('B1').Value = storageName;
This line of code worked fine in Matlab, so I'm under the impression that
Octave just doesn't support this particular command. Is there a way I can
write data back out to my Excel file while it's still open using the COM
interface? Or is my only option to close the actxserver and then re-open
the file using xlsopen and xlswrite?
Writing XLS files was definitely working when I wrote that code. For instance, the example file in the Windows package is writing an Excel file [1]. Could you try this instead:
r = addInfoSheet.Range('B1')
r.Value = storageName;
Michael.