How can I replace NaN with '#N/A' in a dataset and write it to Excel?
이전 댓글 표시
Hi~
I want to do some calculation and write the result to Excel. I want the null to be write as '#N/A' so that the manipulation will be easier in Excel. As an example, I write:
a=rand(3,2);
a(2)=nan;
A=dataset(a(:,1),a(:,2));
A.Properties.VarNames ={'a1','a2'};
export(A,'XLSFile','myA.xlsx')
but the null is a blank in Excel, I wonder how to replace it with '#N/A' . Any ideas?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!