How to read a specific line containing a value?
Show older comments
Hello,
I would like to read the excel line where for example the ID "445678" is written, in order to display the data into edit text box (only 2 columns actually). I did try with find but my excel is composed by numbers and letter so this is not working.
A little help would be appreciated, even just a way of doing it. Thanks for reading
Best regards, Baptiste
4 Comments
Jan
on 20 Mar 2018
Please explain: "I did try with find but my excel is composed by numbers and letter so this is not working". What have you tried exactly? If you post your code, it is much easier to fix it and match your needs exactly.
jacques baptiste
on 20 Mar 2018
Edited: jacques baptiste
on 20 Mar 2018
Guillaume
on 20 Mar 2018
Any reason you're not using readtable instead of xlsread? It would make your life easier.
I don't understand how the screenshot relates to your code where you appear to be searching for the values 101 to 109 which do not appear in that screenshot. In any case, a loop is not required. ismember with the 'rows' option is probably what you need.
I also don't understand how your code relates to your question of finding ID 445678.
Finally, rather than a screenshot (wich we can't use to test code), a demo excel file would be more useful.
jacques baptiste
on 20 Mar 2018
Accepted Answer
More Answers (0)
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!