Writing time data into excel

I have an array of data stored in matlab as such:
time=
‘14:43:51.89567’
‘15:12:43.32253’
‘15:34:65.97059’
‘16:34:30.45221’
When I write this data into excel using xlswrite, the data shows up in excel written as a different format. I want the format to be exactly the same in excel as it is stored in matlab in the variable time as shown above.

 采纳的回答

This is probably one of the dumbest thing that Excel does. Sometimes I hate it too. What I did is like this:
time={'14:43:51.89567'
'15:12:43.32253'
'15:34:65.97059'
'16:34:30.45221'};
NewFormat=strcat('''',time);
xlswrite('test.xls',NewFormat);

1 个评论

Thank you,
I will test that code out right now and get back to you.

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by