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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

PhilipNienhuis
<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.

P

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" <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     please do not write to developers in private.
>     Enter a bug report or write to the mailing lists.
>     P.
>
>     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,
>         '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);
>           endif
>
>         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);
>           endif
>
>           %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.
>
>
>         Cheers
>         Alexej
>
>


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave