MATLAB: How to make all cells in uitable editable in matlab GUI and save them when i press pushbutton ? how to read all contents from xlsread array

callbackedit data in tableguipushbuttonsave datauitable

I have GUI which has uitable. I want to read data into table and display when I select options in the listbox … The GUI also has two push buttons edit and save to enable edit and save after I make changes I am using xlsread to read data into array. however, for some reason, it reads all the cells but not the first two rows of excel file which has text

Best Answer

[~, ~, raw] = xlsread('YourFile.xls');
Now raw will contain headers and all.
h = uitable('data', raw, 'ColumEditable', true(1, size(raw,2)));