Import data based on markers in Excel.
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
dpb
on 18 Jun 2018
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.
0 Comments
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!