MATLAB: Problem reading excel data, unknown format

importing excel datastring conversionxlsread

I have a sample of data from a bigger one in excel (attached), I tried with this lines of code to read the data (I need to work with the numeric values), I know they are special characters since they have a blank space before the numeric str, I tried the next but in doesn't work, any ideas?
[num,txt,raw] = xlsread('data.xls', '1', 'A1:N8'); x=(strtrim(char(txt(1,7))))% it should give '14' but still gives ' 14'
thanks

Best Answer

It’s not a ‘normal’ space (char(32)). It’s a ‘nonbreaking’ space, (char(160)).
Use strrep to replace it with a ‘normal’ space:
txt = strrep(txt, char(160), char(32));
x=(strtrim((txt(1,6))));
Then, it works.