Hello,
This is my first post on this site, so sorry if anything is confusing. I am a Microsoft 10 user with Excel 2021.
For this HTML file, I tried accessing the data highlighted (and covered) in black.
HTML For Slide 6 Export.png
Code:
With Sheets("Slide6Export")
.Activate
.Cells(s, 4) = ieObj.document.getElementsByClassName("readOnlyData")(0).innerText
.Cells(s, 5) = ieObj.document.getElementsByClassName("readOnlyData")(1).innerText
.Cells(s, 6) = ieObj.document.getElementsByClassName("readOnlyData")(2).innerText
.Cells(s, 7) = ieObj.document.getElementsByClassName("readOnlyData")(3).innerText
.Cells(s, 8) = ieObj.document.getElementsByClassName("readOnlyData")(4).innerText
.Cells(s, 9) = ieObj.document.getElementsByClassName("readOnlyData")(5).innerText
End With
Where s is the row number in my excel worksheet. When I run the code or step through it, the cells are blank. I have other data in columns 1-3 that is successfully pulled using the getElementById command. Other methods I have tried are:
Code:
.Cells(s, 4) = ieObj.document.getElementsByClassName("fieldgroup")(1).Children(1).textContent
.Cells(s, 4) = ieObj.document.getElementsByClassName("fieldgroup").Children(1).textContent
.Cells(s, 4) = ieObj.document.getElementsByClassName("fieldgroup")(1).Children(1).innerText
.Cells(s, 4) = ieObj.document.getElementsByClassName("fieldgroup").Children(1).innerText
Thank you in advance for your time!