Forum

Error with web scra...
 
Notifications
Clear all

Error with web scraping using VBA

2 Posts
2 Users
0 Reactions
71 Views
(@goldberg)
Posts: 1
New Member
Topic starter
 

Team can anyone guide me how to over come the error when web scraping is done with the VBA code.

I have attached the Macro file for your reference and the error code which I get is 'Invalid use of Null' which i marked as a comments in the code for your reference. Added html code in notepad.

Also please look into the code and make any necessary changes that i missed.

This code is used for scraping data from a web page. 

My apologies if haven't convoyed the message properly.

 

Thanks a lot

GoldBerg

 
Posted : 08/10/2021 6:30 am
(@catalinb)
Posts: 1937
Member Admin
 

Hi Gold,

I think you should use Set Col1=IE.document.querySelectorAll(".wo-notes-num") instead of HTML.querySelectorAll(".wo-notes-num")

If you go to https://www.w3schools.com/Jsref/tryit.asp?filename=tryjsref_document_queryselectorall_class and make the changes like in the image below, the query works.

1-3.jpg

 
Posted : 12/10/2021 9:53 am
Share: