write a row from excel to a text file

2 views (last 30 days)
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 Comments
Stephen23
Stephen23 on 30 Mar 2021
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++.
Elysi Cochin
Elysi Cochin on 30 Mar 2021
Thank you sir for your suggestions

Sign in to comment.

Accepted Answer

Cris LaPierre
Cris LaPierre on 30 Mar 2021
  5 Comments
Cris LaPierre
Cris LaPierre on 30 Mar 2021
Edited: Cris LaPierre on 30 Mar 2021
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.
Elysi Cochin
Elysi Cochin on 30 Mar 2021
Great Sir, thank you so much. Thanks a lot, now it works perfectly

Sign in to comment.

More Answers (0)

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!