The second output argument of xlsread
contains text data. The first contains only numerical:
>> [nums,colors,raw] = xlsread('colorData.xlsx','A1:A3');
>> colors
colors =
'Red'
'Green'
'Blue'
UPDATE: The times read by xlsread
are in Excel's serial date format (a numerical representation). They can be converted to a string with the time using datestr
.
>> nums
nums =
0.0417
0.0833
0.1250
>> datestr(nums)
ans =
1:00 AM
2:00 AM
3:00 AM
These are actually dates, using Jan. 1 1900 as time zero. So, but giving just a time, it a number assuming this day. However, MATLAB uses Jan-1-0000, so if you have dates as well as times, convert them using datestr(t + datenum('30-Dec-1899'))
, where t
is the numerical value with the serial date number.