Compare two column values and display the third column value from the excel based on list box input.
1 次查看(过去 30 天)
显示 更早的评论
i have a excel sheet which is having 3 columns each column is having the student information.
1st and 2nd columns are having the semester-I and semester-II status respectively like "pass", "Fail", "Distinction", "first", "second", "third class"..etc
In my GUI, i have two list box which is for sem-I and Sem-II marks. if i select any input from the both list box then it has to compare with the excel sheet row values.
once both the list box inputs are found in the excel sheet, then it has to display the 3rd column value as the output
for example
if i select "distinction" from 1st list box and "Fail" from 2nd listbox then it has to show the corresponding value from the 3rd column...
回答(1 个)
Vishal Rane
2013-9-23
If you need to read data from excel and display it in the listbox:
- use xlsread to read data from the specific cells
- assign the data to the listboxes using set()
3 个评论
Vishal Rane
2013-9-23
All u need now is the selected values from the list boxes.
get(listbox_handle,'Value')
gives index of the selected element from the list.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!