write a row from excel to a text file
2 次查看(过去 30 天)
显示 更早的评论
How can i write a string row ( not English ) from excel to notepad or wordpad. Is it possible in Matlab?
I have attached a sample excel sheet
8 个评论
Stephen23
2021-3-30
I suspect that R2018a is unable to handle all Unicode correctly, but I have no way to check this. Perhaps Chris LaPierre can help further on clarifying this.
As an aside, I strongly recommend that you use a robust text editor, for example Notepad++.
采纳的回答
Cris LaPierre
2021-3-30
It's possible, but you have to bring the data into MATLAB first, then write it to a text file.
5 个评论
Cris LaPierre
2021-3-30
编辑:Cris LaPierre
2021-3-30
Doesn't sound like it. You hadn't indicated what version of MATLAB you were using, so I used my version, which is R2021a.
You may need to specify the encoding. Try using this for your write command.
writetable(d,"Book1.txt","WriteVariableNames",false,"Delimiter","\t",'Encoding','UTF-8')
For more details, see the "Write Foreign-Language Characters to Text Files" section of the R2018a writetable documentation.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!