How do i get columns of excel files into pop up menu?
Show older comments
Hi team, I am facing problem in getting columns of excel file into popup menu. I used the following code.
filename=uigetfile({'*.xls';'*.csv'});
handles.filename=filename;
set(handles.editpath,'String',filename)
guidata(hObject, handles)
setpopupmenuString(handles.popupmenucycle,eventdata,handles)
function setpopupmenuString(hObject,eventdata,handles)
filename=handles.filename;
[numbers,colNames]=xlsread(filename);
set(hObject,'String',colNames);
The popup menu is displaying values of 1st column alone with its header. Someone please help me in solving this problem.
Accepted Answer
More Answers (0)
Categories
Find more on File Operations 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!