Reading specific data from an excel file
13 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have an excel file that contains a number of columns. What I want to do is to read the elements of one column ( for example column C) and when the string 'delta' is read at this column then read the respective element of another column (for example column I) and save it to a vector. What I have done is:
ind=find(ismember(xlsread('test.xlsx', 'C:C'),'delta'))
D = xlsread('test.xlsx', 'Iind:Iind')
but the ind that is returned contains more positions of 'delta' than the ones that actually are and 'Iind:Iind' to define the range of the elements in column I that I want to read is not accepted.
Any help on that? Thanks in advance
0 件のコメント
回答 (3 件)
Elijah Uche
2014 年 10 月 27 日
The above solutions are not quite clear to me. My question though is a bit different. I want to read a particular element from an Excel file which has for example 500 rows and 3 columns. I am interested in the element in the 200th row and second column. I have 1000 of these files in a particular folder. How do I extract this particular element from all the files so I could analyse and plot a graph with what's extracted instead of manually going through each of the 1000 files to get these elements? Thank you Uche
0 件のコメント
David Sanchez
2014 年 6 月 24 日
I think it would be better to read just once the *.xls file, since it is a time-consuming process. And moreover, after reading your *.xls you will have all your data into matrix and cell format which can be easily manipulated in Matlab.
Your search will be performed much faster and easier.
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!