+ Reply to Thread
Results 1 to 6 of 6

could not get last element while looping through class name (web scraping)

  1. #1
    Forum Contributor
    Join Date
    01-06-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    118

    could not get last element while looping through class name (web scraping)

    HI,


    In the attached file I wrote code to get elements from HTML code. last "For loop" (loop through class name) in the code is not working properly. With this code, i want to get all 8 elements. But i got first 7 elements only. i did not get 8th element value ( AI column value - yellow colored Cells). Pls go through the code and help me.


    Regards
    Syed
    Last edited by shiva_raj; 03-18-2017 at 08:16 PM.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,906

    Re: could not get last element while looping through class name (web scraping)

    You are not looking correctly the value is filled in column 35 , the problem is it starts with blank line so you do not see it.
    Column 32 has the same problem only this one does show up.
    But the value is there, cjheck all the cells that seem blank.
    Attached Images Attached Images
    Last edited by Keebellah; 03-18-2017 at 06:24 PM. Reason: forgot attachment
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: could not get last element while looping through class name (web scraping)

    You have got 8 elements. The count starts from 0, not 1, so you get 8(0-7 is equals to 8).

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,906

    Re: could not get last element while looping through class name (web scraping)

    @AB33: yes true but the reason she did not see it is what I explained above.

    modify this line:

    Please Login or Register  to view this content.
    Attached Images Attached Images

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: could not get last element while looping through class name (web scraping)

    Is she or he?

  6. #6
    Forum Contributor
    Join Date
    01-06-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    118

    Re: could not get last element while looping through class name (web scraping)

    Hahahaha. I'm Male Mr. Keebellah.

    I didn't check properly in column 35. Thanks to all of you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. “= 1st class’ lower class limit + class width"
    By CheeseFace in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2016, 08:21 PM
  2. Replies: 12
    Last Post: 01-14-2014, 01:56 PM
  3. Replies: 2
    Last Post: 05-18-2013, 02:31 PM
  4. [SOLVED] Help with looping through all elements in Class Array
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2013, 06:47 PM
  5. [SOLVED] Stat table with formulas for each data element but only when the element exists in table
    By stevemills04 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2013, 05:50 AM
  6. [SOLVED] ComboBox class .AddItem filled in class module
    By Jacques Grobler in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-03-2012, 05:48 AM
  7. Looping through each element of an array
    By Conan Kelly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2006, 06:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1