bugGNU Octave - Bugs: bug #49830, xlsread difference vs. matlab

 
 

bug #49830: xlsread difference vs. matlab

Submitted by:  Steven Weinberg <wstevena>
Submitted on:  Mon 12 Dec 2016 10:09:24 PM UTC  
 
Category: NoneSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: PostponedAssigned to: None
Originator Name: steve weinbergOpen/Closed: Open
Release: otherOperating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 13 Dec 2016 06:01:50 PM UTC, comment #1:

IMO returning NaNs for empty cells using xlsread is a stupidity of Matlab caused by legacy behavior inherited from old Excel versions. TTBOMK earlier versions of matlab used to return yet other bit patterns than NaN.

I think you can get similar results by using this:

xls = xlsopen ('test1.xlsx');
c = xls2oct (xls, 'restrictions','c2:f7', struct ('strip_array', 0));
xls = xlsclose (xls);
[a, b] = parsecell (c);

No NaNs yet but empty cells. To get NaNs you'd do:

c(cellfun (@isempty, c)) = NaN;

Or, you can use the fourth return arg of xlsread to fix up c (type "help xlsread")

I'm (yet) not quite in favor of "fixing" this.

Setting status => postponed and lowering priority

Philip Nienhuis <philipnienhuis>
Project Member
Mon 12 Dec 2016 10:09:24 PM UTC, original submission:

Matlab:

Octave:

The difference in the third output, c, is causing problems. I am using io 2.4.5.

Steven Weinberg <wstevena>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #39206:  test1.xlsx added by wstevena (9KiB - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wstevena (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 13 Dec 2016 06:01:50 PM UTCphilipnienhuisCategoryOctave Forge Package=>None
      Severity3 - Normal=>1 - Wish
      StatusNone=>Postponed
      Release4.2.0=>other
    Mon 12 Dec 2016 10:09:24 PM UTCwstevenaAttached File-=>Added test1.xlsx, #39206

    Back to the top


    Powered by Savane 3.1-cleanup1