2

我确信这是一件非常简单的事情,但我没有必要的知识来处理它。我确实进行了广泛的搜索,但找不到任何解决方案——这可能是因为我什至不确定要寻找和研究什么。:-/

我正在尝试从以下 URL 将 csv 文件下载到 matlab:http: //www.fangraphs.com/projections.aspx? pos=all&stats=pit&type=rzips&team=0&players=0

单击该页面上的“导出数据”链接会下载一个 csv 文件,然后我可以轻松地将其手动导入 matlab。我想避免整个过程的“手动下载”部分,而是让 matlab 阅读它。

如果我查看页面源,“导出数据”链接如下所示: href="javascript:__doPostBack('ProjectionBoard1$cmdCSV','')

如何将此 csv 文件下载到 matlab 中?我可以利用 urlread 为我做这件事吗?如果是这样,怎么做?即使只是指向要研究的正确资源的指针也会非常有帮助......

提前感谢谁会回答!

4

1 回答 1

1

Based on your question, it sounds like you don't really need code for it at all.

unless you really need a code solution, I personally would just add matlab as the default handler for CSV files, so I can open it directly from the link.

2 steps:
1) tell you browser to use matlab as the handler for CSV files: Chrome instructions here: (All major browsers have similar capabilities) http://productforums.google.com/forum/#!topic/chrome/ynjN66lLg2U

2) Tell you browser to autorun that type of link: (again answer in this case is for chrome, but all major browsers have similar capabilities) http://blog.rubbersoft.com/2010/01/how-to-automatically-open-downloaded-files-in-chrome/

于 2013-08-16T16:03:53.307 回答