Reading specific data from an excel file
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (3)
Elijah Uche
il 27 Ott 2014
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 Commenti
David Sanchez
il 24 Giu 2014
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 Commenti
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!