简体   繁体   English

PowerPivot-如何从Yahoo Web服务获取数据

[英]PowerPivot - How to grab data from Yahoo webservices

I would like to import weather forecasts in PowerPivot for a specified country by using Yahoo API. 我想使用Yahoo API在PowerPivot中导入指定国家的天气预报。 So first of all I got the data stream URL including all requiered parameters to get forecasts (it works in my browser). 因此,首先,我获得了包括所有必需参数的数据流URL,以获取预测(它在我的浏览器中有效)。

https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%3D612977&format=json&diagnostics=true&callback=

Then I tried to use it as "Other data Stream" in PowerPivot to grab the content. 然后,我尝试将其用作PowerPivot中的“​​其他数据流”以获取内容。 However I got the following strange error about DTD : 但是我收到有关DTD的以下奇怪错误:

Cannot connect to the specified feed. 无法连接到指定的供稿。 Verify the connection and try again. 验证连接,然后重试。 Reason: For security reasons DTD is prohibited in this XML document. 原因:出于安全原因,此XML文档中禁止使用DTD。 To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method 若要启用DTD处理,请将XmlReaderSettings上的DtdProcessing属性设置为Parse并将设置传递到XmlReader.Create方法。

Any idea to solve that ? 有解决的办法吗?

The easiest was to install PowerQuery for Microsoft Excel then creating a new request to Yahoo Web Services. 最简单的方法是安装PowerQuery for Microsoft Excel,然后向Yahoo Web Services创建新请求。 After parsing data in PowerQuery (split columns, etc) , formatted data is available in a PowerPivot tab and you can use it as well as direct imported data in PowerPivot. 在PowerQuery中解析数据(拆分列等)之后,可以在PowerPivot选项卡中使用格式化的数据,并且可以在PowerPivot中使用它以及直接导入数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM