write Vietnamese words to a excel file

2 次查看(过去 30 天)
Hi,
I want to write Vietnamese words from Matlab to a excel file. However, in the output is not as the same as input, error font. How can i solve it?
This is the code i use
filename = 'testdata.xlsx';
A = {'Vùng','Thủy triều: cao nhất 3,2 m, lúc 4h00, thấp nhất 0,7m, lúc 16h44'};
sheet = 1;
xlRange = 'A1';
xlswrite(filename,A,sheet,xlRange);
and the output is
Vung Th?y tri?u: cao nh?t 3,2 m, lúc 4h00, th?p nh?t 0,7m, lúc 16h44
Thanks,
Manh

回答(1 个)

Walter Roberson
Walter Roberson 2017-1-16
I do not happen to have Excel for Windows available, so I could not test with xlswrite() directly. However, I found something that works, at least on new-ish versions of MATLAB:
writetable( cell2table(A), 'testdata.xlsx', 'WriteVariableNames', 0)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by