我可以在Google中使用ImportHTML从Yahoo检索财务数据,但是缺少Google的数据。例如,这里有一个与福特在Google上的财务报告的链接,我将如何在Google中使用ImportHTML来获取这些数据?
https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG
发布于 2016-10-27 17:56:31
这完全取决于你想要什么。这些表都是可用的:
损益表季度数据
=importhtml(
"https://www.google.com/finance? q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",2)损益表年度数据
=importhtml(
"https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",3)资产负债表季度数据
=importhtml(
"https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",4)资产负债表年度数据
=importhtml(
"https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",5)现金流量季度数据
=importhtml(
"https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",6)现金流量年度数据
=importhtml(
"https://www.google.com/finance?q=NYSE%3AF&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",7)要获得其他公司,请在单元格中输入股票symvol (即;F、GOOG、IBM),并在URL中引用该单元格。如下所示:
=importhtml(
"https://www.google.com/finance?q="&A2&"&fstype=ii&ei=viASWOnfNsfEeqqUnMgG","table",2) "& A2 &“引用单元格A2。该公式将在单元格A2中得到该公司的数据。
https://stackoverflow.com/questions/40289010
复制相似问题