Intro to Web Scraping with Excel VBA

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 พ.ย. 2024

ความคิดเห็น • 124

  • @dianasharon5647
    @dianasharon5647 4 ปีที่แล้ว +17

    This is great but where's part 2 and part 3 and so on?! This is like the best web scraping tutorial on TH-cam so far! Please release more! Thank you!!

  • @discovermetaldetecting
    @discovermetaldetecting 4 ปีที่แล้ว +10

    I know that this video tutorial is a little old now but I've only just stumbled across it. I have a project that I am messing around with and this tutorial was absolutely brilliant! Thankyou so much for taking the time to do this for people like me. Your style and delivery was fantastic.

  • @pmmgpgp
    @pmmgpgp 2 ปีที่แล้ว +1

    Yours was the 4th example I looked at for scraping. I really wish I'd started here. Concise and very easy to understand.

  • @anshulzade6355
    @anshulzade6355 3 ปีที่แล้ว

    great work man. keep it up. the world needs you.

  • @Dhampirefr
    @Dhampirefr 3 ปีที่แล้ว

    Thank you dude ! You just saved my project, couldn't find an API to extract properly precipitations/month data from the internet, i just modified your code to fit the web page i was looking for and it's down ! Love ya

  • @johnjacobjinglehimerschmid3555
    @johnjacobjinglehimerschmid3555 5 ปีที่แล้ว +2

    Remember I when I was trying to do this like 9 years ago. Couldn't find anybody that had some clear tutorials. Talk about struggling to understand what I was doing. Now ..... I can find a plethora of vba tutorials out there. Where where ya'll around 2000?
    Nice vid.

    • @Spotifys-w3e
      @Spotifys-w3e 7 หลายเดือนก่อน

      2005 TH-cam first launched. Back then some people had only one computer there sharing.

  • @Andyrodz
    @Andyrodz 4 ปีที่แล้ว

    Great video. You make visual basic with excel fun and easy to learn. Thanks.

  • @diskin3058
    @diskin3058 5 ปีที่แล้ว

    you're a good teacher. give us more of web scraping. can barely find any decent courses.

  • @maheshmohankumar7194
    @maheshmohankumar7194 5 ปีที่แล้ว +1

    You are a savior... Awesome video. Great job. Thank you so much! Looking forward to more such VBA macros tutorials with real life project applications. 👍🙂

  • @naveen3406
    @naveen3406 4 ปีที่แล้ว

    Hi Kyle,
    I am a huge fan of your Teaching Style.
    I wrote the code to "List of countries by population (United Nations)" in Wikipedia with a little change.
    Guess what it's WORKING!!!
    Thanks a lot.👍👍👌👌

  • @RijwanKhan-kg1rl
    @RijwanKhan-kg1rl 2 ปีที่แล้ว +1

    Well explained. Thanks for this tutorial your video have me hope to perform on coding, thanks a lot....

  • @exheil
    @exheil 4 ปีที่แล้ว +1

    Just passing by to say: thank you. This was quite helpful! You explained it quite well, especially the concept of parent and child which was key to what I was attempting to do. Now onto figuring out how to trim values.

  • @dww527
    @dww527 4 ปีที่แล้ว +1

    Awesome video, one slight problem, the wikitable has been modified to 7 columns, the code works fine for cell A1 which grabs htmlele.Children(0).textContent (which is a blank header object), when advancing to cell B1, the error: Run-time error '424' Object required occurs. I cant tell if the blank entry for A1 was returned or not, will try this approach with other tables in other web pages to see if I can grab the table contents, thanks...

  • @oppamaclare
    @oppamaclare 3 ปีที่แล้ว

    Hey, I got it to work for my me. Thank you so much. I've been looking for something like this, for a long time.

  • @jayaivan
    @jayaivan 4 ปีที่แล้ว +2

    This is for one page, how to use it for multiple page (pagination)?

  • @ahmetbahar1966
    @ahmetbahar1966 4 ปีที่แล้ว

    Master is a great code. Thanks for your sharing. I am from Turkey in Istanbul

  • @mangobrother
    @mangobrother 5 ปีที่แล้ว +1

    Great tutorial. You sir are a great teacher!

  • @AlexVideoProductions
    @AlexVideoProductions 5 ปีที่แล้ว

    Sir, Excellent tutorial, well explained and with right amount of clear information. I have learned a lot from it. Thank you so much.

  • @riazkhan3537
    @riazkhan3537 3 ปีที่แล้ว

    Excellent illustration. Thanks

  • @Cosmologist722
    @Cosmologist722 5 ปีที่แล้ว

    Sir.....You are excellent teacher !

  • @BillyLongshot
    @BillyLongshot ปีที่แล้ว

    Love the explanation. Still use the udemy course as a reference when starting a VBA project. But Internet Explorer is simply no longer accepted as a browser for the website I need to work with

    • @OfficeNewb
      @OfficeNewb  ปีที่แล้ว

      Thank you for sharing!

  • @azharuddinkhan6779
    @azharuddinkhan6779 4 ปีที่แล้ว +1

    Hi bro, could you do the same thing using Google Chrome. If yes please show us.

  • @InternacionalCinema
    @InternacionalCinema 5 ปีที่แล้ว +1

    What If that class was Clickable? What If i wanted to click in the text of the class and not just copy what is wrote, how can I write the code?

  • @RahulSharma-vm1fz
    @RahulSharma-vm1fz 3 ปีที่แล้ว +1

    Is Web data scraping or importing data illegal?
    Cheers.

  • @muhammadrasuleslamiankoupa7011
    @muhammadrasuleslamiankoupa7011 ปีที่แล้ว

    hi, tnx for video it was very useful, i have question :
    if we want to scraping a specific row of a html table (their is 20 "tr") , what we should to do ???

  • @TeamStarBrawl
    @TeamStarBrawl 4 ปีที่แล้ว

    Hi, your video is a great help. Thanks! But I have a tiny problem which I can't resolve. The very last row in the table from the website I'm scrapping from is not useful and has no further children (except the first one). Is there a specific coding to make the loop stop on the second last row so that I won't get an error message (because of the no children)?

  • @sagarshrivastava6391
    @sagarshrivastava6391 5 ปีที่แล้ว +1

    Sir, can you pls tell how to extract the href value of the next td, i wrote this code .Range("F" & i).Value = htmlELe.Children(5).href . But it is giving error. Can you pls tell me the correct line of code.

  • @ahrorkuldashev9603
    @ahrorkuldashev9603 4 ปีที่แล้ว +1

    Terrific explanation!

  • @1975nacgul
    @1975nacgul ปีที่แล้ว +1

    The best video about parsing

  • @EVD46
    @EVD46 3 ปีที่แล้ว

    Great and clear tutorial. Thanks. Does the child-concept also works for tags ?

  • @saberouhammou9419
    @saberouhammou9419 4 ปีที่แล้ว

    this is just very helpful tuto
    thank you so much
    the macro works without any problem

  • @vashisht1
    @vashisht1 2 ปีที่แล้ว

    Sir why don't you try using power query get data from web?

  • @matogkulturappen6599
    @matogkulturappen6599 3 ปีที่แล้ว

    Great and easily understandable mate! Are there any way to include the styling of the table? like the darker colours on heading, and flags for example?

  • @johng5295
    @johng5295 5 ปีที่แล้ว +1

    You nailed it! You really have an inventive mind. This is learning by doing at its best . It is written that "A student is not better than the teacher, but the student who has been fully trained will be like the teacher"(Bible Luke 6:40). Thanks for the best stuff on earth. And, now I fill like I can code like my teacher--like you. "Great teachers are hard to find." How many more tricks you got? What's the best macro vba book for beginners that you might recommend me to buy?

  • @pram8395
    @pram8395 3 ปีที่แล้ว

    Pls help answer my question. I'm quite desperate here. How do you get that table if you are using Opera? It is because Internet Explorer can't fully load the target web page... :(

  • @daringetae5136
    @daringetae5136 4 ปีที่แล้ว

    Internet Explorer is obsolete. Show us how you scrap data from google or microsoft edge because they are not included in the library. Thanks

  • @alexko464
    @alexko464 4 ปีที่แล้ว

    you are a genius of explanation :)) keep going

  • @mc-ws7nv
    @mc-ws7nv 5 ปีที่แล้ว

    i have a page with a 6 columns by many rows table containing uniform sized pictures with text (ex. Bob Corp) and a price (ex. $2,000,000) in each picture. Any way to scrape this text and number out of the pictures?

  • @festusdixon3602
    @festusdixon3602 4 ปีที่แล้ว +1

    I'm getting a run time error stating
    Automation error
    The object invoked has disconnected from its clients'
    What solution can be done to solve this error

  • @rafaelmachado8641
    @rafaelmachado8641 4 ปีที่แล้ว +1

    Incredible! You explain in a way that leaves no questions..great work!
    Would that be possible to make one of those using the HTTP Request Library?

  • @joabevidal1729
    @joabevidal1729 4 ปีที่แล้ว

    congratulations for the very good video. I don't speak english and I couldn't even activate the leganda in the video, but goastaria to know if you have how to enter some website and automatically log into excel? thanks

  • @jacobstromburg5803
    @jacobstromburg5803 4 ปีที่แล้ว

    I'm applying your code to a slightly different application. When I'm at the code line, "For Each htmlEle In..." i keep getting either object doesn't support property or method, or object required. Any idea what I'm doing wrong?

  • @rezarezaeiabyaneh1965
    @rezarezaeiabyaneh1965 7 หลายเดือนก่อน

    I get below error:
    the remote server machine does not exist or .....

  • @telhommep
    @telhommep 4 ปีที่แล้ว

    what about if you have google chrome explorer ? Thanks

  • @johnjacobjinglehimerschmid3555
    @johnjacobjinglehimerschmid3555 7 หลายเดือนก่อน

    Ok this showed back up in my recommend list. Do you have a new version that does not use IE 11, how are we able to do this today?

    • @OfficeNewb
      @OfficeNewb  7 หลายเดือนก่อน

      Thank you for watching. Not yet will put this on the list of videos to create!

    • @johnjacobjinglehimerschmid3555
      @johnjacobjinglehimerschmid3555 7 หลายเดือนก่อน

      @@OfficeNewb
      By the way. Google sheets, and I think the excel 365 have these baked in web data getting functions. Those CAN be great however, finding a web developer that still puts data into the section is getting fewer and fewer. Need to be able to scrape data from out of a CSS styled table.
      Also for God's sake if/when you do this I think you should also include how to login in to a personal acct of some sort so that people like me can automate reconciling their excel checkbook register and budgeting.
      Just an FYI

  • @MultiNarutoGamer
    @MultiNarutoGamer 5 ปีที่แล้ว

    Thanks for the video.
    ".Range("A" & i).Value = htmlEle.Children(0).textContent" works fine, however in the line of ".Range("B" & i).Value = htmlEle.Children(1).textContent" I always get error 91. My table has 3 td's so it should work. do you have any ideas? :(

  • @origamicrane685
    @origamicrane685 4 ปีที่แล้ว

    How do you get a .csv file from a web page?

  • @kuatulangan9811
    @kuatulangan9811 4 ปีที่แล้ว

    sir, would you help me please???... i fail to get data from a website with autenthic login database... as when i type an id... the data from within the id is shown... and i want to get those data save its on excel.. is it possible sir???

  • @drs10301
    @drs10301 4 ปีที่แล้ว

    Dear Sir, what is the code for "attaching files in whatsapp(web whatsapp)" using excel VBA in chrome

  • @farhanshaikh5315
    @farhanshaikh5315 4 ปีที่แล้ว

    It is really good and help full thanks for making this

  • @enrikekasijas705
    @enrikekasijas705 4 ปีที่แล้ว +1

    Nice! What if I must run a different webrowser than Internet Explorer ?;(

    • @rafavince
      @rafavince 4 ปีที่แล้ว

      What you activate in 8:03 is the connection from microsoft windows to their browser IE. And guess what they don't like chrome that much

  • @rbrtsparkman
    @rbrtsparkman 5 ปีที่แล้ว

    I am subscribing because of this video!!

  • @Eric-gz1uw
    @Eric-gz1uw 3 ปีที่แล้ว

    Hi dear, I have two questions: 1, What to do if the web form has a next page? 2.The webpage requires us to log in with a username, password and verification code,What should I do?

  • @francismata4492
    @francismata4492 5 ปีที่แล้ว

    how about for the website you were need to input the password to open the link?

  • @papidandeando
    @papidandeando 5 ปีที่แล้ว

    how do you do this with a jtable?

  • @missingno1428
    @missingno1428 5 ปีที่แล้ว

    what if the site does not have Tables but divs ?

  • @rodrigolisboanascimento8794
    @rodrigolisboanascimento8794 5 ปีที่แล้ว +1

    I love it so much! Thanks!!!

  • @gsssbibipurschoolpatiala6416
    @gsssbibipurschoolpatiala6416 6 ปีที่แล้ว

    Dear Mr Kyle Pew,
    SUBJECT : Excel Query to search required record from large excel file in few clicks.
    I m ATTACHING EXCEL FILE For reference
    Sir i have one query ..i am Amandeep Singh and working as a school clerk. I am basic to intermediate level excel user.
    I am asked by many Students to find their name and complete record in an large excel file .
    I followed traditional way of Control +F shortcut Key which is time consuming . Right now I am finding the record of candidate with numerous click of keyboard
    I just want to know is there any well defined awesome excel query method like using Forms or using function or formula available to fetch the record of required candidate from large excel file.
    For example, I m fantasizaing about an excel form in which I have to select the named range of large excel fileand then only thing left is i have to fill the name of candidate,Fathers name of candidate and date of birth in a form or formula to fetch the record of required candidate I am lookin for.
    ..i m confused how to fetch the record of required candidate of my institute in few clicks.
    If any wayout is there pls share with me.
    I m looking forward to your response
    whats your email address where i have to share the excelfile

  • @flamefeather01
    @flamefeather01 5 ปีที่แล้ว +1

    Awesome tutorail.. Thank you. What if the website have to enter password and username to input first?

    • @micha4186
      @micha4186 4 ปีที่แล้ว

      You have to find ids of fields with login and password, populate them with your data, find id of the button and click it with vba

  • @ferozshaikh2642
    @ferozshaikh2642 3 ปีที่แล้ว

    The same code not working on my side

  • @vishwasanvi6180
    @vishwasanvi6180 5 ปีที่แล้ว

    Hey how to Pull data from chrome I am unable to modify !!

  • @trafalgarjunior2618
    @trafalgarjunior2618 4 ปีที่แล้ว

    thanks for the video, just wondering if anybody has the solution for error 91?

  • @Gokachu1
    @Gokachu1 4 ปีที่แล้ว

    Hi,
    I tried out the code and it mostly works, however I get the error that the object has disconnected from its client on the For Each htmlEle... line. Do you know how to fix this? Thanks!

    • @shaemaye
      @shaemaye 4 ปีที่แล้ว

      yeah, me too I am getting the same error as well

  • @Drkalaamarab
    @Drkalaamarab 5 ปีที่แล้ว

    Sir, well explained. Thanks for uploading this tutorial I am little perplexed on coding part. But your video have me hope to perform on coding 🙂.
    I will contact if there are any questions further.

  • @fazalwahab11
    @fazalwahab11 5 ปีที่แล้ว

    Could you please make a video on extracting reviews and rating for multiple keywords to search on a website using vba automation

  • @Drkalaamarab
    @Drkalaamarab 5 ปีที่แล้ว +1

    Sir, can you tell how to extract data from maps ? I am working on projects. I have done entering by manually

    • @msahajar
      @msahajar 4 ปีที่แล้ว

      Hey Have you succeeded in achieving this? I have got some similar tasks to do. Thanks

  • @michaelborja1877
    @michaelborja1877 4 ปีที่แล้ว

    Excellent tutorial. This is what I'm looking for. Ine question though, what if the table has multiple pages, how can I copy the rest of the pages? Many thanks!

    • @micha4186
      @micha4186 4 ปีที่แล้ว

      If other pages have different URL you have to send new request with new URL

  • @johnadair4979
    @johnadair4979 3 ปีที่แล้ว

    If you're on Chrome, instead of clicking on "View source," you'll want to select "Inspect" to bring up the debugger window.

  • @luis_ffernando
    @luis_ffernando 4 ปีที่แล้ว

    This is awesome!!! but, I've a question: When I open the link where is the data that I want to transfer to excel, has an emergent window. how can I close it and once transferred the data and How can I close the main window of internet explorer??

    • @amitkrchoudhary49
      @amitkrchoudhary49 4 ปีที่แล้ว +1

      please try with this - ieobj.quit before end sub
      it will close your internet explorer

  • @shourobmohammed2370
    @shourobmohammed2370 4 ปีที่แล้ว

    How do you get only one specific row into the spreadsheet?

    • @micha4186
      @micha4186 4 ปีที่แล้ว +1

      TR tag in HTML is one row. If you loop through all TRs you get all rows. But you can choose only one, particular row to collect data. For example checking name of the country

  • @germanduterte7110
    @germanduterte7110 5 ปีที่แล้ว

    Sir what if the website needs to input username and password ?

  • @goodman57
    @goodman57 4 ปีที่แล้ว

    Extremely helpful, thank you

  • @echpe0
    @echpe0 4 ปีที่แล้ว +1

    Bro you are the Best!!! helpe a lot downloading my data custormer everyday (backup) thank you, just one aditional question, how to change the explorer to Chrome??

    • @hqhedis8915
      @hqhedis8915 4 ปีที่แล้ว

      It cannot be changed to chrome because VBA is linked with IE none of other.

    • @remlatzargonix1329
      @remlatzargonix1329 4 ปีที่แล้ว

      HQ Hedis ...that's too bad because I wanted to use Firefox.....Also, doesn't Microsoft now use chrome as its main search engine?

  • @fazalwahab11
    @fazalwahab11 5 ปีที่แล้ว

    Wow that's great video. Thank you

  • @festusdixon3602
    @festusdixon3602 4 ปีที่แล้ว

    Please help me with this issue sir

  • @lemanet
    @lemanet 5 ปีที่แล้ว +1

    excelent tutorial!

  • @rodrigolisboanascimento8794
    @rodrigolisboanascimento8794 5 ปีที่แล้ว

    Many thanks. Great tutorial.

  • @vishalbhanwal514
    @vishalbhanwal514 ปีที่แล้ว

    I'm using this code in pc. It just opened the website and didn't extract any data. Please help me. What i can do now

    • @OfficeNewb
      @OfficeNewb  ปีที่แล้ว

      Can you upload a screenshot of your VBA code?

    • @vishalbhanwal514
      @vishalbhanwal514 ปีที่แล้ว

      @@OfficeNewb can you please share me your email address

  • @gagansaluja5523
    @gagansaluja5523 4 ปีที่แล้ว

    Great tutorial

  • @shailendrapandey4321
    @shailendrapandey4321 ปีที่แล้ว

    Does this work with chrome

    • @OfficeNewb
      @OfficeNewb  ปีที่แล้ว

      It should work with any browser. But Microsoft programs always work best with Microsoft Edge

  • @dorcascelestino8317
    @dorcascelestino8317 3 ปีที่แล้ว

    keep getting 462 error Help

  • @OlivierFranck
    @OlivierFranck 5 ปีที่แล้ว

    Hey what if I wanted to click an (A) tag hyperlink inside a table of hyperlinks.
    Many thanks.
    Great tutorial. Perfect for the second phase of my education. 😎😎👌👌

  • @leeblack2103
    @leeblack2103 4 ปีที่แล้ว

    Nice!! Thanks bro. :-)

  • @SuperTheKunal
    @SuperTheKunal 4 ปีที่แล้ว

    Amazing teacher, no doubt about that but I tried doing this code on several computers:
    every time I get this error:
    "Run-time error '438':
    Object doesn't support this property or method"
    P.S. I did reset my internet explorer also deleted everything in it including favorites but no luck.
    When I click on Debug it takes me to the code "For .....("tr")" with Yellow highlights.
    Please help.

    • @edsonmatheus7976
      @edsonmatheus7976 4 ปีที่แล้ว +1

      I think its a time execution problem, try to do this: after the line >> ieObj.navigate..., put:
      ieObj.navigate
      Do while ieObj.busy
      Doevents
      Loop
      Application.wait( now + timevalue("00:00:05"))
      For each ...

    • @SuperTheKunal
      @SuperTheKunal 4 ปีที่แล้ว

      @@edsonmatheus7976 thank you so much, mr. Matheus. Okay, I will do that. 😊

    • @SuperTheKunal
      @SuperTheKunal 4 ปีที่แล้ว

      @@edsonmatheus7976 No luck! I added the extra lines of code. The same error persists!

    • @SuperTheKunal
      @SuperTheKunal 4 ปีที่แล้ว

      This is where the error is highlighted in yellow. "For Each htmlEle In ieObj.document.getElementByClassName("wikitable")(0).getElementsByTagName("tr")" Is there anything wrong here?

    • @edsonmatheus7976
      @edsonmatheus7976 4 ปีที่แล้ว

      @@SuperTheKunal I don't see anything wrong in your code, but anyways put your entire code here, I'll take a look for you and try to find what's wrong.

  • @martinalba6936
    @martinalba6936 4 ปีที่แล้ว

    Thanks a million

  • @saplkereviz6824
    @saplkereviz6824 3 ปีที่แล้ว

    Thank you so much

  • @michaelthwaite3282
    @michaelthwaite3282 3 ปีที่แล้ว

    Link return 404 error

  • @zaheedhasib
    @zaheedhasib 5 ปีที่แล้ว

    Thanks a lot for the video ,learned something very useful.
    I had one question regarding charts with let's say double headers, like the one in this link?
    en.wikipedia.org/wiki/List_of_countries_by_Human_Development_Index

  • @rafaelvanin1466
    @rafaelvanin1466 4 ปีที่แล้ว

    Top👏👏

  • @crstreet
    @crstreet 5 ปีที่แล้ว

    Great video hands down;) But IE :-|

  • @TickleMeTimbers
    @TickleMeTimbers 3 ปีที่แล้ว

    RIP my ears. Also this could have been a 5 minute video.

  • @rodrigolisboanascimento8794
    @rodrigolisboanascimento8794 5 ปีที่แล้ว

    Many thanks. Great tutorial.