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.

 Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 26 Jul. 2011

0 Stimmen

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 Kommentar

Fish
Fish am 26 Jul. 2011
Thank you,
I will test that code out right now and get back to you.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by