[Top][All Lists]

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

Re: A bug in the xlswrite.m (io package for octave)

From: Philip Nienhuis
Subject: Re: A bug in the xlswrite.m (io package for octave)
Date: Mon, 4 Dec 2017 18:56:55 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 SeaMonkey/2.48

<brought over from private email conversation>

FYI, this reminds me of a bug that was fixed quite some time ago.
Be sure to install the latest version (2.4.8)

There are good reasons to not write developers directly:
- They often don't have time to support all issues themselves, so other people on the mailing lists may help (and that often does happen) - It serves as a base for looking up if similar or the same problems have been raised before.


Alexej Konrad wrote:
Well, just wanted to help... and did not see any other info on the
package site but just your email address.
Will have another look and make a bug report if I find where, if not -
forget it.

On Dec 3, 2017 10:54 PM, "Philip Nienhuis" <address@hidden
<mailto:address@hidden>> wrote:

    please do not write to developers in private.
    Enter a bug report or write to the mailing lists.

    Alexej Konrad wrote:

        Hi Philip,

        I just downloaded the io package for Octave and tried to write
        an array
        into an excel spreadsheet:

            arr= {'Date', 'Time', 'Value'; ...
                  '01.07.2017', '09:00:01.500', '20.7'; ...
                  '01.07.2017', '09:00:04.730', '-2.0'};

            status= xlswrite('C:/myData/tmp/myExcel.xlsx', arr,

        but encountered the error message

            error: 'r_extnd' undefined near line 175 column 27
            error: called from
                xlswrite at line 175 column 3

        A look into the mentioned code line revealed that indeed the
        r_extnd is defined in a special case only:

          elseif (nargin >= 4)
            wsh = arg3;
            crange = arg4;
            r_extnd = (isempty (strfind (crange, ":")) && nargin >= 4);

        without understanding the code in detail I think the code line is
        misplaced and must be put outside of the elseif branch (the
        AND-connection with the condition nargin >= 4 ensures that only
        in that
        case the content is meaningfull):

          elseif (nargin >= 4)
            wsh = arg3;
            crange = arg4;
            %r_extnd = (isempty (strfind (crange, ":")) && nargin >= 4);

          %my modification
          r_extnd = (isempty (strfind (crange, ":")) && nargin >= 4);

        Maybe I overlook some side effects, but at least for me that
        modification works fine.

        Consider a correction for the next release and please let me
        know if you
        have a better proposal for the correction.


reply via email to

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