Write Data to txt file from Excel
9 次查看(过去 30 天)
显示 更早的评论
I have some data in cell D3:D10 in an excel file. I want to write these particular data in a txt file. How do I do that?
2 个评论
Walter Roberson
2022-3-17
编辑:Walter Roberson
2022-3-17
Is it numeric data?
Is it required that the MATLAB program instruct Excel to write the data, or would it instead be acceptable to read the data into MATLAB and have MATLAB write the data?
采纳的回答
Arif Hoq
2022-3-17
编辑:Arif Hoq
2022-3-17
try this:
A=readtable('data.xlsx','ReadvariableName',false);
writetable(A,'myfile.txt')
or
B=readmatrix('data.xlsx');
writematrix(B,'myfile2.txt')
更多回答(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!