Wed 02 Apr 2014 08:37:38 AM UTC, original submission:
I was trying to use the xlswrite function from the IO package(ver 2.0.2)to write the array 'main'(6x4) into the range 'A4:D9' on the worksheet 'wfm' of the excel file 'try.xlsx'
I have available COM interface only. It's working, as checked with:
">> chk_spreadsheet_support
ans = 1"
However, it gave me the following error message:
"xlswrite('try.xlsx' , main, 'wfm','a4:d9')
error: Only the OCT interface is present | requested, but that has only read support
error: called from:
error: C:\Users\FJX023\Documents\Software\octave\octave-3.8.1\share\octave\packages\io-2.0.2\xlsopen.m at line 265, colu
mn 7
error: C:\Users\FJX023\Documents\Software\octave\octave-3.8.1\share\octave\packages\io-2.0.2\xlswrite.m at line 174, col
umn 9"
The error message would mean that no interface is available, although the check says COM is working!
I checked the line 265 of the xlsopen.m file to see what it was doing, and I found this:
263 ## Catch attempts to write xlsx if only OCT interface is supported
264 if (xlsintf_cnt == 1 && xlsinterfaces.OCT)
265 error ("Only the OCT interface is present | requested, but that has only read support");
266 endif
I considered that it's a typo, as if xlsint_cnt<>0, it means there is at least one interface allowing writing xls files. Therefore, I modified it to be:
264 if (xlsintf_cnt == 0 && xlsinterfaces.OCT)
It did the trick. I could make it write in the xls file, but I don't know if I'm right or it was merely luck.
Thx,
Ferney
|