How can I get an Excel with differentes rows each time I write a name in a GUI and I press the buttom "Save" to save the information in a row of an Excel file?
3 ビュー (過去 30 日間)
古いコメントを表示
I want to write information of patients (name, surname, telephone, etc) and I want to safe that information on an Excel each time I press the buttom Save in a GUI. How can I do that?
0 件のコメント
回答 (1 件)
ES
2017 年 6 月 26 日
in the callback function of the save button, you will do an xlswrite.
Something like this:
function SaveButton_Callback(hObject, eventdata, handles)
persistent rowno;
sPatientName = get(handles.editbox1,'String');edit box with patient name
sPatientAge = num2str(get(handles.editbox2,'String'));edit box with patient age
...all other data you need
xlswrite('PatientData.xlsx', {sPatientName, sPatientAge}, 'Sheet', ['A',num2str(rowno)]);
rowno = rowno+1;
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!