Find and read a value in an excel spreadsheet
1 次查看(过去 30 天)
显示 更早的评论
Hi,
If I create two arrays in MATLAB that represent and store the column name and row names of a table, I want to then find the matching value in an excel spread sheet corresponding to the column name and row name elements
Possible?
Thanks, N Kennedy
0 个评论
回答(1 个)
KL
2017-9-5
Something like this?
filename = 'myExample.xlsx';
sheet = 1;
columnNames = {'A','B','C'};
rowNames = {'1','2','3'};
xlRange = [columnNames{1} rowNames{1}];
yourData = xlsread(filename,sheet,xlRange);
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!