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.

 Risposta accettata

Fangjun Jiang
Fangjun Jiang il 26 Lug 2011
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 Commento

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

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by