返回列表 上一主題 發帖

[發問] 如何下載網頁價量明細

[發問] 如何下載網頁價量明細

https://pchome.megatime.com.tw/stock/sto0/ock3/sid1216.html
想copy上方網址價量明細
請問要如何用excel vba達成?

推一下
請問有大大知道如何下載版主提供的網站嗎?
https://pchome.megatime.com.tw/stock/sto0/ock3/sid1216.html
小弟也疑惑中

另外一個可以下載的網站
一次只會顯示最多300筆資料
還是有人會控制可以顯示所有的資料也可以
https://ww2.money-link.com.tw/TWStock/StockTick.aspx?SymId=2330

也還有一個網站可以下載明細,也是完整的
https://www.moneynet.com.tw/stoc ... 2%E9%9B%9C%E8%AA%8C
但此網站似乎更複雜,有人可以分享一下如何下載完整的價量明細嗎?
PKKO

TOP

本帖最後由 quickfixer 於 2020-6-16 04:39 編輯

回復 2# PKKO

GBKEE大,5/10在這裡有回答過,2篇文章也才差10天
http://forum.twbts.com/thread-22543-1-1.html
  1. Sub Ex()
  2.     Dim R As Integer, C As Integer
  3.    
  4.     With CreateObject("InternetExplorer.Application")
  5.        .Visible = True
  6.         .Navigate "https://pchome.megatime.com.tw/stock/sto0/ock3/sid1216.html"
  7.         Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
  8.         With .Document.all.tags("table")(2)
  9.             For R = 0 To .Rows.Length - 1
  10.                 For C = 0 To .Rows(R).Cells.Length - 1
  11.                     ActiveSheet.Cells(R + 1, C + 1) = .Rows(R).Cells(C).innerText
  12.                 Next
  13.             Next
  14.         End With
  15.         .Quit
  16.       End With
  17. End Sub
複製代碼
https://www.mobile01.com/topicdetail.php?f=511&t=4737630
對速度有要求不要錯過01這篇,非常快
#797有pchome的code

TOP

本帖最後由 PKKO 於 2020-6-16 11:55 編輯

回復 3# quickfixer

感謝:quickfixer 大大的回覆
1. 是我沒有爬文清楚
2. 您的回覆非常精準
2-1. 您的回覆直接回答了我的答案,且標示了期他的建議文章,和建議文章的位置


    感激,受用無窮!!!
PKKO

TOP

        靜思自在 : 甘願做、歡喜受。
返回列表 上一主題