Importing data from an Excel file on a website
2 次查看(过去 30 天)
显示 更早的评论
I am trying to import data from an Excel file on a website (Subversion Repository). I tried and failed with:
PATHNAME_KEY = 'http://XXsvn/XXXXX/XXXXX/XXXXX/XXXXX/'; FILENAME_KEY = 'Key.xlsx';
cd(PATHNAME_KEY)
With Error:
??? Error using ==> cd Cannot CD to http://XXsvn/XXXXX/XXXXX/XXXXX/XXXXX/ (Name is nonexistent or not a directory).
Error in ==> Classification at 66 cd(PATHNAME_KEY)
0 个评论
回答(2 个)
Fangjun Jiang
2011-10-5
Of course you can not run cd(PATHNAME_KEY) because that url is not a directory. I wonder if you can run
xlsread(fullfile(PATHNAME_KEY,FILENAME_KEY))
2 个评论
Fangjun Jiang
2011-10-5
Then I guess you can't read an .xls file directly from a web site. You have to download the file first and then read it. That's part of the "http". Web browser can interprets it and get the content using whatever protocol, but not for xlsread().
Walter Roberson
2011-10-5
You will need to use urlread() or (probably better for your purpose) urlwrite() .
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Export to MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!