从Web可导出电子表格导入数据 [英] Import Data from Web Exportable Spreadsheet

查看:177
本文介绍了从Web可导出电子表格导入数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用fangraphs.com的大量数据的电子表格。以下是我使用的其中一个数据集的示例:



http://www.fangraphs.com/leaders.aspx?pos=all&stats=bat&lg=all&qual=0&type=0&season=2014&month = 0& season1 = 2013& ind = 0& team = 0& rost = 0& age = 0& filter =& players = 0



是另一个例子:



http://www.fangraphs.com/leaders.aspx?pos=all&stats=bat&lg=all&qual=0&type=0&season=2014&month=13&season1=2013&ind=0&团队= 0&安培; ROST = 0&安培;年龄= 0&安培; FIL ter =& players = 0



所以在我的电子表格中,我有一个标签,其中包含您在该网站上选择导出数据时获得的数据。目前,当我想更新数据时,我需要转到该网站,并手动导出每个电子表格并将其粘贴到主表单的选项卡中。



我如何主表中的两个选项卡会从这些可导出的表单中的数据自动更新?一个朋友提到我可以使用R,所以我已经下载了,但我不知道从哪里开始寻求自己去做这个。



谢谢提前,请让我知道,如果你需要更多的细节!

解决方案

你不必学习全新的语言 R 在这种情况下)完成工作。



基本上,您将要编写浏览器自动化脚本(点击,等待,获取数据)或废除网页。



您可以使用您已经知道的语言编写浏览器自动化脚本,请 https://code.google.com / p / selenium-vba



此问题还提供了一些提示:如何下载co分页的Jquery / JS表格?


I have a sreadsheet that uses a lot of data from fangraphs.com. Here is an example of one of the data sets that I am using:

http://www.fangraphs.com/leaders.aspx?pos=all&stats=bat&lg=all&qual=0&type=0&season=2014&month=0&season1=2013&ind=0&team=0&rost=0&age=0&filter=&players=0

Here is another example:

http://www.fangraphs.com/leaders.aspx?pos=all&stats=bat&lg=all&qual=0&type=0&season=2014&month=13&season1=2013&ind=0&team=0&rost=0&age=0&filter=&players=0

So within my spreadsheet I have a tab that contains the data you get when you select "Export Data" on that website. Currently when I want to update the data I need to go to the site and manually export each spreadsheet and paste them into the tabs of my main sheet.

How can I have the two tabs in my main sheet automaticaly update with the data from those exportable sheets? A friend mentioned that I could use R, so I have it downloaded, but I'm not sure where to begin looking to teach myself how to do this.

Thanks in advance, and please let me know if you need any more details!

解决方案

You don't have to learn completely new language (R in this case) to get the work done.

Basically you are going to write browser automation script (click,wait,fetch data) or "scrap" the web page.

You can write browser automation script in the language you already know, check https://code.google.com/p/selenium-vba

This question also provides some hints: How to download the contents of a paginated Jquery/JS table?

这篇关于从Web可导出电子表格导入数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆