我正在尝试使用以下代码使用VBA刮取yellowpages.com,但没有数据被记录
For Each ele In .document.all
Select Case ele.tagname
Case Results
RowCount = RowCount + 1
Case "Name"
sht.Range("A" & RowCount)=ele.innerText
Case "Adress"
sht.Range("A" & RowCount) = ele.innerText
Case "Email"
sht.Range("A" & RowCount) = ele.innerText
End
Select Next ele
End With
结果只是空白没有错误
答案 0 :(得分:0)
Case Results
是错误的。您可能希望Case "Results"
代替
不确定这里的格式是否错误,但是:
End
Select Next ele
应该是
End Select
Next ele