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
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!