how to save xcel file in two coloum in matlab using xlswrite
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Rohit Bhoi
el 22 de En. de 2016
Respondida: Geoff Hayes
el 22 de En. de 2016
I have GUI form and I in which there are 12 text box and 12 edit box. I want save this form using in excel format. first column should be all text boxes and second column should all edit box value. I obtained value using get(handle.tex) and get(handle.edit) value but enable to save. so have can I save this using xlswrite
0 comentarios
Respuesta aceptada
Geoff Hayes
el 22 de En. de 2016
Rohit - what can you tell us about the data in the text and edit fields? Are they numeric or do they contain characters? If a combination of the two, you may want to create a 12x2 cell array where each element from the first column corresponds to one of the text boxes, and each element in the second column corresponds to one of the edit boxes. Something like the following should do
data = cell(12,2);
data{1,1} = char(get(handle.text1,'String')); % convert to number if needed with str2double
data{2,1} = char(get(handle.text2,'String'));
% etc.
data{1,2} = char(get(handles.edit1,'String'));
% etc.
myFilename = 'myExcelFile.xls';
xlswrite(myFileName,data);
Try the above and see what happens!
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!