Effacer les filtres
Effacer les filtres

Exporting (i.e., downloading) Multiple Files from a MATLAB Web App

11 vues (au cours des 30 derniers jours)
Cory Fraser
Cory Fraser le 14 Oct 2020
Commenté : oran le 24 Oct 2021
Is it possible to have a single download (file export) from a MATLAB Web App that contains multiple items/files in the download?
For example, consider a push button on the GUI that allows the user to export a data table from the GUI into an Excel file. This could be completed using:
[FileName,PathName,FilterIndex] = uiputfile('*.xlsx','Specify the save location and file name','Saved_ExcelFile');
resultFilePath = fullfile(PathName,FileName);
writecell([app.Table.ColumnName']; [app.Table.Data]], resultFilePath);
When run in the Web App, the above code would create a "download" in the user's browser, and the download would contain one file. However, say there were 50 different files that needed to be extracted from the GUI, and assume the names of the indivudal files can be generated programmatically - does the Web App functionality allow for a set of files to be "bundled/zipped/packaged" together and exported as a single download?
Thanks for any insight you can provide!
Cory

Réponse acceptée

Mamta Kamath
Mamta Kamath le 4 Déc 2020
Hello Cory,
I understand your request about downloading multiple files from MATLAB web app. However, that action is not supported yet.
Possible workaround is to zip all the files for download and call uiputfile to trigger the download of zip file.
Please refer to the Example Script for much better understanding of how you can do this.
Furthermore, I've shared your request with the development team for consideration.
Thanks,
Mamta
  1 commentaire
oran
oran le 24 Oct 2021
Mamta: I'm researching this functionality for an upcoming project. However, the example script seems to be blocked behind mathwork's sharepoint. Is there anyway I can see the script?
Thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Downloads dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by