input and excel sheet and output a different one

7 views (last 30 days)
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

Accepted Answer

Shameer Parmar
Shameer Parmar on 16 Jun 2016
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.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!