Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-26-2022, 08:16 AM
Noah2 Noah2 is offline Need help pulling info from a website Windows 10 Need help pulling info from a website Office 2021
Novice
Need help pulling info from a website
 
Join Date: Jul 2022
Posts: 1
Noah2 is on a distinguished road
Default Need help pulling info from a website

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!
Reply With Quote
Reply

Tags
data extraction, html conversion, vba code

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulling data aligahk06 Excel 1 07-31-2019 07:22 AM
Pulling info from an email into a form on Word jlamx Word 1 07-07-2017 08:24 PM
Help please: Automatically pulling info out of one document and place in others. qwerty11 Word 2 06-25-2013 07:49 AM
Need help pulling info from a website arrows remain between task bars, but predecessor info disappears from task info Antares Project 1 12-14-2011 09:19 AM
Need help pulling info from a website Need help with pulling out information mtnguye9 Excel 6 07-24-2010 07:52 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft