我想得到一些股票的实时市场价格(印度市场),这些股票已经在我的MSExcel表中提到,可以自动更新。我在google (=googleFinance())中看到了一个做同样事情的函数。但是这个功能在MS EXcel 2016中是不可用的。如何在MSExcel中使用此函数,或者是否有其他选择?
发布于 2022-08-25 13:56:20
我做了一个对我有用的密码。
Function GoogleFinance(index As String)
Dim resultado As Double, ie As Object
Set ie = CreateObject("internetexplorer.application")
ie.navigate "https://www.google.com/finance/quote/" + index + ":BVMF"
Do While ie.busy
DoEvents
Loop
On Error Resume Next
resultado = ie.document.getElementsByClassName("YMlKec fxKbKc")(0).innertext
ie.Quit
GoogleFinance = resultado
End functionhttps://stackoverflow.com/questions/65829390
复制相似问题