|
カテゴリ:お勉強
Sub abista11tr() Dim i_time As Long i_time = timeGetTime() Dim objIE As InternetExplorer Call ieView(objIE, "") Dim htmlDoc As HTMLDocument Set htmlDoc = objIE.document Dim colTR, colTH, colTD, ele As IHTMLElement Dim i As Long i = 1 Set colTR = htmlDoc.getElementsByTagName("tr") For Each ele In colTR Set colTH = ele.getElementsByTagName("th") Debug.Print colTH(0).innerText If colTH(0).innerText = "勤務地" Then Cells(i, 1) = colTH(0).innerText Set colTD = ele.getElementsByTagName("td") Cells(i, 2) = colTD(0).innerText 'Cells(i, 1) = ele.innerText i = i + 1 End If Next ele i = 1 Set colTR = htmlDoc.getElementsByTagName("tr") For Each ele In colTR Set colTH = ele.getElementsByTagName("th") Debug.Print colTH(0).innerText If colTH(0).innerText = "仕事内容" Then Cells(i, 3) = colTH(0).innerText Set colTD = ele.getElementsByTagName("td") Cells(i, 4) = colTD(0).innerText 'Cells(i, 1) = ele.innerText i = i + 1 End If Next ele i = 1 Set colTR = htmlDoc.getElementsByTagName("tr") For Each ele In colTR Set colTH = ele.getElementsByTagName("th") Debug.Print colTH(0).innerText If colTH(0).innerText = "雇用形態" Then Cells(i, 5) = colTH(0).innerText Set colTD = ele.getElementsByTagName("td") Cells(i, 6) = colTD(0).innerText 'Cells(i, 1) = ele.innerText i = i + 1 End If Next ele i = 1 Set colTR = htmlDoc.getElementsByTagName("tr") For Each ele In colTR Set colTH = ele.getElementsByTagName("th") Debug.Print colTH(0).innerText If colTH(0).innerText = "給与" Then Cells(i, 7) = colTH(0).innerText Set colTD = ele.getElementsByTagName("td") Cells(i, 8) = colTD(0).innerText 'Cells(i, 1) = ele. i = i + 1 End If Next ele i = 1 Set colTR = htmlDoc.getElementsByTagName("tr") For Each ele In colTR Set colTH = ele.getElementsByTagName("th") Debug.Print colTH(0).innerText If colTH(0).innerText = "勤務時間" Then Cells(i, 9) = colTH(0).innerText Set colTD = ele.getElementsByTagName("td") Cells(i, 10) = colTD(0).innerText 'Cells(i, 1) = ele.innerText i = i + 1 End If Next ele MsgBox Format$(timeGetTime - i_time) & " ミリ秒" End Sub
お気に入りの記事を「いいね!」で応援しよう
[お勉強] カテゴリの最新記事
|