Reading an element from Excel files
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 read and 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 comentarios
Respuestas (1)
Geoff Hayes
el 27 de Oct. de 2014
Elijah - try using xlsread to get the 200th element of the second column. If you have a list of *.xlsx files, then as you iterate through this list, just read the single element from each file and store it in an array
x(k) = xlsread(myFilename,'B200');
myFilename is just a local variable representing the kth filename (say, 'myFileK.xlsx'). You may need to supply the worksheet name before the 'B200' string. See the xlsread documentation for details.
0 comentarios
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!