Reading specific data from an excel file
조회 수: 1 (최근 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!