+ Reply to Thread
Results 1 to 1 of 1

problem while scraping data from website

  1. #1
    Registered User
    Join Date
    09-03-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    8

    Post problem while scraping data from website

    i am facing problem to scrap data from website here is my code.i have TIN no in column A i want Name as per Department record in Column B and status (i.e.Active/Cancel dt) in column C. I need help. PLEASE SOMEBODY HELP ME TO SOLVE MY PROBLEM.

    PHP Code: 
    Sub VerifyVatTinFromMahavat()
      
    Dim RowCount As Long
      Dim sht
    ele As ObjectTIN
      Dim objIE

     Set sht 
    Sheets("Sheet1")
       
      
    RowCount 1
      sht
    .Range("B" RowCount) = "Name as per Dept.Record"
      
    sht.Range("C" RowCount) = "Active/Cancel Dt"
      
    eRow sht.Cells(Rows.Count1).End(xlUp).Offset(10).Row

      Set objIE 
    CreateObject("InternetExplorer.Application")

      
    With objIE
        
    .Visible True
        
    .Navigate "http://mahavat.gov.in/Tin_Search/Tinsearch.jsp"
        
          
    Do While .readyState <> 4
          DoEvents
        Loop
        Set TIN 
    = .document.getelementsbyname("tin")
        
    TIN.Item(0).Value sht.Range("A2")
        .
    document.getElementById("Submit").Click
        
    Do While .Busy Or .readyState <> 4
          DoEvents
        Loop
         
    For Each ele In .document.all
          Select 
    Case ele.classname
           
    ' Case "search-head"
           '   
    RowCount RowCount 1
            
    Case "Dealer Name"
             
    sht.Range("B" RowCount) = ele.innertext
            
    Case "STATUS"
              
    sht.Range("C" RowCount) = ele.innertext
        End Select
        Next
      End With
      Set objIE 
    Nothing
    End Sub 
    Attached Files Attached Files

+ 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. Automated data scraping from website into excel
    By kavin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2014, 01:42 PM
  2. Replies: 1
    Last Post: 02-17-2014, 11:21 PM
  3. Scraping website data when Get External Data from Web doesnt work
    By Zipping2010 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2013, 12:16 AM
  4. scraping data from a website
    By redpanda in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-05-2012, 01:20 PM
  5. Scraping website data into Excel
    By oliver79 in forum Excel General
    Replies: 0
    Last Post: 06-13-2010, 02:15 PM

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