Filter löschen
Filter löschen

how to write xls file

1 Ansicht (letzte 30 Tage)
rafi abdul
rafi abdul am 1 Mär. 2013
I have 3 plots in my graph.i have 3 checkboxes,each plot i have assigned it to check box.now i have created one pushbutton and i want to write xls file for checked button whenever pushbutton is pushed.it should look for checked button and should write xlsfile.can anyone help

Akzeptierte Antwort

Image Analyst
Image Analyst am 1 Mär. 2013
Have each button callback call the same function "WriteWorkbooks(handles)". In that function, it checks each checkbox and writes the data if it's checked
function WriteWorkbooks(handles)
checkbox1State = get(handles.checkbox1, 'Value');
checkbox2State = get(handles.checkbox2, 'Value');
checkbox3State = get(handles.checkbox3, 'Value');
if checkbox1State
% Write whatever data you want to for this checkbox.
xlswrite(.......
end
if checkbox2State
% Write whatever data you want to for this checkbox.
end
if checkbox3State
% Write whatever data you want to for this checkbox.
end
  5 Kommentare
rafi abdul
rafi abdul am 4 Mär. 2013
i was trying to write like
xlswrite('af1.csv',[header;p],1,'C2')
but am getting only string data and values are not getting written in csv file.
Image Analyst
Image Analyst am 4 Mär. 2013
xlswrite doesn't write csv files - csvwrite() does that.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by