How to xlswrite cell array with both strings and number?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a cell array of the type A={'01:02:03'};
when I use the function: xlswrite('Output',A)
The excel sheet that I get has eliminated the first zero, it is reading the cell as a number and giving me output as '1:02:03'. How do I get the entire string without eliminating 0?
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2015년 7월 30일
편집: Azzi Abdelmalek
2015년 7월 30일
A={'''01:02:03'};
댓글 수: 5
Azzi Abdelmalek
2015년 7월 31일
s={'01:02:03';11; 20; '01:02:03';'01:02:03' ;11 ;10 }
idx=cellfun(@isstr,s)
s(idx)=strcat('''',s(idx))
xlswrite('fic.xlsx',s)
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!