How to write a .m script that can read .xlsx file?
3 次查看(过去 30 天)
显示 更早的评论
Hi, I'm a newbie to matlab. I'm thinking of writing a simple .m script that can read an .xlsx file on another location. I don't know how to start writing the script (like what should be included on the top section and end section of the script). Here's an example of the scenario:
.xlsx Filename = test1.xlsx
Location of .xlsx = C:\Users\SamanthaTzeeSan\Documents\MATLAB\Example 1
.m script name = matlabTest1.m
Location of .m = C:\Users\SamanthaTzeeSan\Documents\MATLAB
0 个评论
回答(1 个)
Walter Roberson
2015-10-31
num = xlsread( fullfile('C:\Users\SamanthaTzeeSan\Documents\MATLAB\Example 1', 'test1.xlsx') );
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!