2022年3月19日 星期六

[google 試算表] 用 Google 試算表抓取 元大美債20年00679B 股價資料

 1. 打開 Google 試算表

2. 輸入以下公式

=IMPORTXML("https://histock.tw/stock/00679b","//*[@id='Price1_lbTPrice']/span")

=Index(ImportHtml("http://bigcharts.marketwatch.com/advchart/frames/frames.asp?symb=00679b", "table"),3,1)

加個 substitute() 可以取代不想要的字

=Substitute(Index(ImportHtml("http://bigcharts.marketwatch.com/advchart/frames/frames.asp?symb=00679b", "table"),3,1),"Last:","")

沒有留言:

熱門文章