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.

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 7월 26일

0 개 추천

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

Fish
Fish 2011년 7월 26일
Thank you,
I will test that code out right now and get back to you.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

태그

질문:

2011년 7월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by