Loading a text file and generating a .xls file from that
1 次查看(过去 30 天)
显示 更早的评论
I was wondering if there were any functions or a way that i could look at where i could import or load a .txt file and convert it to .xls file automatically rather than doing it manually.
0 个评论
采纳的回答
Walter Roberson
2016-1-5
You would need at least two calls.
xlswrite('YourOutput.xls', load('TheTextFile.txt', '-ascii'));
For this short form to work, the txt file would have to consist of pure numeric values, the same number of columns in every row, and space separated. If that is not the format of your .txt file then the processing involved might be longer.
0 个评论
更多回答(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!