Saving a file made in matlab app designer

31 vues (au cours des 30 derniers jours)
Sam Schiavitti
Sam Schiavitti le 1 Oct 2021
Hello, I made a matlab app where you import an image and it converts that image into an excel file. When I run the app it saves the excel files to my matlab directory. Though, I want to add a button that when clicked asks where you'd like to save the excel file and saves the excel files there. How would I accomplish this. I attatched an image of the data where it asks for the image file and converts it when the button is clicked.

Réponses (1)

Chetan Bhavsar
Chetan Bhavsar le 1 Oct 2021
% Button pushed function: Button
function ButtonPushed(app, event)
% get directory
selectedPath = uigetdir('C:\','Please select Path for saving excel file');
%write xlsx
writematrix('Dummydata',fullfile(selectedPath,'Standard.xlsx'))
end

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by