Web app not able to perform xlsread/xlswrite
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(5 个)
Titus Edelhofer
2018-7-30
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
srinu siliveru
2019-3-15
hi Titus, can you please explain with a example.
thank you
1 个评论
Titus Edelhofer
2019-3-15
编辑:Titus Edelhofer
2019-3-15
I meant something like
data = xlsread('C:\Data\myfile.xlsx');
instead of
data = xlsread('myfile.xlsx');
Titus
srinu siliveru
2019-3-16
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 个评论
Titus Edelhofer
2019-3-18
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
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Web App Server 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!