[Top][All Lists]

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

[Octave-bug-tracker] [bug #52618] A bug in the xlswrite.m (io-2.4.8)

From: anonymous
Subject: [Octave-bug-tracker] [bug #52618] A bug in the xlswrite.m (io-2.4.8)
Date: Thu, 7 Dec 2017 17:32:28 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36


                 Summary: A bug in the xlswrite.m (io-2.4.8)
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Thu 07 Dec 2017 10:32:27 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: Alexej
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.0
        Operating System: Microsoft Windows



A few days ago I downloaded and installed the io-package on my machine and
tried out a simple example of writing 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, 'FirstDataSet')

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 variable 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 entire 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

  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 there is
a better proposal for the correction.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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