Import data based on markers in Excel.
Ältere Kommentare anzeigen
I am importing data from Excel file into Matlab using the xlsread command. My Excel sheet has data in columns B, C, D and E. The column A has the 'markers' at two locations telling me the start and end of rows that I need to import. For example, A7 has a marker "Start Load" and A155 has a marker "Stop Load". The marker locations are not always fixed. Is there a way for Matlab to detect the location of these marker strings in column A and import only those rows?
Thanks in advance,
Joe
Antworten (1)
dpb
am 18 Jun. 2018
0 Stimmen
Read the text data from the spreadsheet in column A and locate the two fields, then reread with the specified range thus computed.
Or, read the whole sheet and return the raw cell data and do the above from the in-memory cell array. Will be somewhat faster as xlsread is fairly slow and so calling it twice will be more overhead-intensive.
Kategorien
Mehr zu Data Import from MATLAB finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!