I want to read multiple non-adjacent columns from an excel spreadsheet
3 次查看(过去 30 天)
显示 更早的评论
Hi there,
I would like to read in four non-adjacent columns from an excel spreadsheet, how do I do this? Example shows I want parts of columns C,H,M and R...
"X = xlsread('mydata.xlsx','C3:C127,H3:H127,M3:M127,R3:R127') ;"
Thanks a lot!
0 个评论
回答(1 个)
Rik
2017-3-9
I would read the entire file and select the data in Matlab afterwards. You need the Excel syntax in the string. I don't think it is possible in the way you want to do this.
X = xlsread('mydata.xlsx');
X=X(3:127,'CHMR'-64);%this trick relies on the conversion from ASCII to an index value
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!