Using VBA Code to extract data from a website

Report
Posts
1
Registration date
Tuesday November 26, 2019
Status
Member
Last seen
November 26, 2019
-
Posts
1
Registration date
Monday July 20, 2020
Status
Member
Last seen
July 20, 2020
-
Hello,

I have little to no programming knowledge or how to work with VBA.
I was wondering if there was a way to write a VBA code to extract data from my company website based on unique product ID's to an excel worksheet.

Many Thanks!

1 reply

Posts
1
Registration date
Monday July 20, 2020
Status
Member
Last seen
July 20, 2020
1
Hi Varun,

What you are looking for is called webscraping, and needs to be treated on a case by case basis due to different website structure.

You can either follow the
"Simulating Web browser user interaction" section in https://analystcave.com/web-scraping-tutorial/
OR
use the plugin suggested
https://analystcave.com/excel-tools/excel-scrape-html-add/

The first step is always to have a basic understanding of HTML. You will need to learn the basics such as <li> for list, <tag> for tag and <class> for class.

If you just need the information from time to time, you can consider browser plugins for web scraping.

You may also try options without VBA, such as Power Query, and Excel 365's FILTERXML() function. You can also use Google Sheets' ImportXML() function. https://support.geckoboard.com/hc/en-us/articles/207238327-Use-Google-Sheets-ImportXML-function-to-display-data-in-Geckoboard
1
Thank you

Glad we were able to help! Love us? Write us a review! Rate CCM

CCM 2932 users have said thank you to us this month