input and excel sheet and output a different one

1 次查看(过去 30 天)
I would like to create an application that imports an excel sheet, modifies it (mainly transpose) and then exports it to a new excel sheet having the modified format. Explicit answers are appreciated. Thanks

采纳的回答

Shameer Parmar
Shameer Parmar 2016-6-16
Hello Michel,
Create a GUI for the same. Add one Push Button, So that when you click on that Pushbutton, it will import the excel file (ABC.xlsx), it will read it, it will store the data into some Array variables, it will modify it as per your requirement, it will then write the modified data into another excel (XYZ.xlsx).
Code will be as follows:
% --- Executes on button press in OK_.
function OK__Callback(hObject, eventdata, handles)
% hObject handle to OK_ (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
importData = xlsread('ABC.xlsx');
modifiedData = 2 * importData + 100;
xlswrite('XYZ.xlsx',modifiedData;
winopen('XYZ.xlsx');
Note: The both excel files should be present in current directory.

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by