Matlab cannot read data from a file which is saved as a text-file from Excel
2 次查看(过去 30 天)
显示 更早的评论
I am not able to load data from a file which was saved as a text-file from MS Excel. textscan and load return an empty matrix. I tried to retype the data within the file using MS Notebook, to save the file with new name, however without success. If I open a new text-file with MS Notebook and copy-paste there the data from the file saved from Excel, then there is no problem with reading. Why?
2 个评论
laurie
2012-6-1
are you sure the format (UTF..) of your text-fil from Excel is the right one ? textscan as a "format" parameter i believe
回答(1 个)
per isakson
2012-6-2
You need to set the input argument, encoding, of fopen. There are many alternatives including "Unicode".
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Data Preparation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!