I'm reading an excel document with xlsread with references to other cells that be either text or numeric values. The problem is that xlsread seems to interpret cells starting with an "=" as numeric even if is a reference to a cell with text. Thus the result of a reference to text cell returns NaN, even in the raw format. Is there any way to work around this? I've tried some tricks (see below) that forces Excel to treat the cell as text but it doesn't work with xlsread. The (very) simple example below illustrates the issue. Example:
A B C D 1 My age is 10 2 =A1 =B1&"" =TEXT(C1;0) =D1> [num text raw] = xlsread('book1.xls')num = NaN NaN NaN 10 NaN NaN NaN 10text = 1×3 cell array 'My' 'age' 'is'raw = 2×4 cell array 'My' 'age' 'is' [10] [NaN] [NaN] [NaN] [10]
Matlab 2016b, Excel 2010 (xls format), Linux.
Best Answer