How can I extract data from Excel using specific headings and multiple columns
3 views (last 30 days)
Show older comments
Hello, I'm hoping this group can help me with some data extraction from an Excel file and importing to MATLAB workspace. I have a single Excel file with data on many different tabs. The data is from automated tests, and can vary in length of the entire file and position of the data-of-interest within each sheet. The common thread in the data is that there is a header in the first column that can be used for finding the right spot to begin extraction. Once this header is found, I would like to extract specific columns from beneath it. The number of rows of data will be consistent from data set to data set. Just need to find it in each tab in the spreadsheet and pull it into MATLAB. I have attached an example of what the data file looks like. I just made up some fake stuff that is formatted in a way that I might see it presented to me. The data in the various tabs are of different number of rows, but there is a consistent set of data in each tab for which I am interested.
I would like to first find [ANALOG OUT POSTCAL], then create an array that includes interesting columns below this header. For example, in this case, I would like to end up with an array that captures the data in columns A, D, and H. Then I can go about processing this data in various ways. I've tried various things with mixed results, and not finding a good way to do it programmatically. Simply put, I just don't have the expertise in MATLAB. I have read a previous post about pulling data from headers, but was having problems getting it to work for multiple desired columns.
Any suggestions?
0 Comments
Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!