MATLAB: Time stamp using xlswrite

datestrMATLABxlswrite

Hi all,
I want to put a time stamp next to the data that I export to excel. Hence, I did this:
clox=datestr(now)
xlswrite('d:\repeati.xlsx',clox,'E5:E5');
However, this will just display a '1' in my excel file. What am I doing wrong?
Cheers, T.

Best Answer

clox=cellstr(datestr(now))
xlswrite('d:\repeati.xlsx',clox,'E5:E5');