Problem reading data from Excel sheet.

I have seen a good number of questions realted to my problem but I have not been able to solve it. I am using xlsread and the Excel file it is reading from is in the same file as my code on my computer. The problem is that none of the data is being pulled from the Excel document when I run the code. It just reports: "1x0 empty double row vector" in the command window. Here is how my code looks:
clear all;
T1 = xlsread('DATA_Temp.xlsx','A:A');
N = 1:numel(T1);
T1_smooth = smoothdata(T1);
display(N);
plot(N,T1, '-r');%, N, T1_smooth, '-b');
Thanks for the help. I am also running Matlab R2017a on Windows 7, if that helps.

Réponses (1)

Star Strider
Star Strider le 7 Fév 2019
The person (or application) that wrote the Excel file may not have done it correctly. If the numeric data (the first output of xlsread) is empty, add the other outputs to see if the data were actually imported to Excel as strings, for example:
[T1,S1,R1] = xlsread('DATA_Temp.xlsx','A:A');
It is possible to recover the numeric data from the strings, although it may require some effort.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by