Web app not able to perform xlsread/xlswrite
Afficher commentaires plus anciens
I've compiled a web application with matlab web app compiler. In my code I use both .mat files and .xlsx files which are located in the same folder. While my program is able to access .mat files without any error, xlsx files are not accessible returning the error: Excel couldn't find the specified file. However, when run in matlab environment I do not receive this error. The error appears when I try to run the app from my web server.
Réponses (5)
Titus Edelhofer
le 30 Juil 2018
0 votes
Hi Giulio,
have you tried to first build up the full path to the Excel file? So instead of only the file name provide the full path?
Titus
1 commentaire
Giulio Francesca
le 1 Août 2018
srinu siliveru
le 15 Mar 2019
0 votes
hi Titus, can you please explain with a example.
thank you
1 commentaire
Titus Edelhofer
le 15 Mar 2019
Modifié(e) : Titus Edelhofer
le 15 Mar 2019
I meant something like
data = xlsread('C:\Data\myfile.xlsx');
instead of
data = xlsread('myfile.xlsx');
Titus
srinu siliveru
le 16 Mar 2019
0 votes
thank you very much.
i will try
srinu siliveru
le 16 Mar 2019
0 votes
Thanks a lot sir
it worked.
srinu siliveru
le 16 Mar 2019
0 votes
Will it works if i want to use the .exe file in another sytem because path will change
can you please help me how to handle that.
thanks in advance
2 commentaires
Titus Edelhofer
le 18 Mar 2019
Hi,
you might use the function isdeployed to distinguish:
if isdeployed
% read from folder A on system where exe runs
else
% read from folder B on your development system
end
Titus
srinu siliveru
le 21 Mar 2019
hi Titus
Thank you for helping
srinu
Catégories
En savoir plus sur MATLAB Web App Server dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!