How can I send a file via Web Application
Show older comments
Hi I deployed a web application. After analyzing data imported by user through web browser, I want to send results as an excel file that can be downloaded by user. How should I do that?
Accepted Answer
More Answers (1)
Roberto M Sanchez
on 3 Dec 2019
1 vote
Hello,
This theath has show quite well how to download an excel table using the command writetable. My problem is that I have generated a pdf report with reportgenerator and I want use saveas instead of writetable. But saveas is not supported in webapps.
How can I send the pdf report to the user?.
Thanks.
3 Comments
Hunter Casillas
on 3 Jan 2020
I was able to send a pdf to the user using the following code:
Where report.OutputPath is the path to where the pdf is stored on the server.
web(report.OutputPath);
Alessandro
on 27 Feb 2023
You basically "saved my life"!!!!! Great!
Osborn
on 30 Jan 2024
@Hunter Casillas's solution works great for non-Excel files. Thanks!
Categories
Find more on MATLAB Web App Server in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!