octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #42028] Error in xlswrite in package io


From: anonymous
Subject: [Octave-bug-tracker] [bug #42028] Error in xlswrite in package io
Date: Wed, 02 Apr 2014 08:37:39 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?42028>

                 Summary: Error in xlswrite in package io
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 02 Apr 2014 08:37:38 AM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: Ferney
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.1
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

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






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42028>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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