- 帖子
- 3
- 主題
- 1
- 精華
- 0
- 積分
- 4
- 點名
- 0
- 作業系統
- win xp
- 軟體版本
- office 2003
- 閱讀權限
- 10
- 性別
- 男
- 註冊時間
- 2011-8-3
- 最後登錄
- 2011-11-15
|
網頁資料轉到excel的問題
當把網頁的資料copy到excel時每一行會變成一格資料
我想讓所有資料以原來的樣子貼在同一個儲存格 該如何做呢
我的程式碼如下
Sub IE()
Dim myhr
Dim IEbrowser As Object
Set IEbrowser = CreateObject("InternetExplorer.Application")
myhr = "http://tw.yahoo.com/"
With IEbrowser
.navigate myhr
Do While .busy
DoEvents
Loop
.document.execCommand "SelectAll", False
.document.execCommand "Copy", False
With Worksheets("Sheet1")
.Range("A" & .[A65536].End(3).Row + 1).Select
.Paste
End With
.Quit
End With
Set IEbrowser = Nothing
End Sub |
|