• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Web data extraction: www.mca.gov.in

Suril

Member
mca.gov is the site of indian government for regulation of companies and LLPs.. this site is a bug repository of data...

question for now: on the link www.mca.gov.in/DCAPortalWeb/dca/MyMCALogin.do?method=setDefaultProperty&mode=31 there is an option to mention the name of the company or its first characters and all the companies with name corresponding to the same will be displayed:

eg. word reliance give me some 100s of cos with name starting frm reliance

I need a vba code to give me a list of such name in my sheet..
 
Last edited:
Hi, Suril!
What values are supposed to be entered in the 2nd text box? Please specify all possible combinations.
Regards!
 
Dear @SirJB7,

After going to the link, the button 'search' is to be pressed without typing anything.. A dialog box will pop out with the link [url]http://www.mca.gov.in/DCAPortalWeb/dca/MyMCALogin.do?method=setDefaultProperty&mode=31[/URL]
In this dialog box, there is only 1 input box.. Here, typing something like 'reliance' or 'infosys' and then pressing 'search' will give the desired result.

PS: It might be possible that there are many results.. One page shows only 10 results and then next 10 gets displayed and pressing 'next'.. I will be more than happy if you provide me a code to show even the first 10 results only.. if the code give me all the results, it will be a bonus!
 
Hi, Suril!
I'm bad news, that website doesn't expose the data tables in a downloadable way from Excel, at least in the pop up window that's displayed when you press the Search button.
Regards!

@vijay.vizzu
Hi!
Could you elaborate on how that link would help Suril with his issue? Thank you.
Regards!
 
This is what I achieved till now:
Code:
Dim IE, ie1 As Object

Set IE = CreateObject("internetexplorer.Application")
IE.Visible = True
IE.navigate "http://www.mca.gov.in/DCAPortalWeb/dca/MyMCALogin.do?method=setDefaultProperty&mode=31"
Do
DoEvents
Loop Until IE.readystate = 4

IE.navigate "javascript: disablename();CINLookup ('cmpnyID','cin','cmpnyname','companyName');"


Application.Wait (Now + TimeValue("0:00:5"))
Set IE = Nothing

     Set ie1 = CreateObject("InternetExplorer.Application")
     ie1.Visible = True

Application.Wait (Now + TimeValue("0:00:5"))
ie1.navigate "http://www.mca.gov.in/DCAPortalWeb/dca/displayCIN.do?method=getCIN"


ie1.document.getelementbyid("companyname").Value = "reliance"
ie1.navigate "javascript:pageLevelSubmit(this, " & """" & " fetchCIN" & """" & "," & """" & "true" & """" & ", " & """" & "1501" & """" & ");" & """"

End Sub

The second last line gives an error:
Code:
ie1.document.getelementbyid("companyname").Value = "reliance"
 
Hi, Suril!
Try this:
Code:
ie1.Document.getElementsByName("companyName").Item(0).Value = "reliance"
Regards!
 
Hi, Suril!
It works for me. Have you tried debugging it step by step with F8? I could upload a simple sample file, but it won't make any difference, since I copied your code and fixed that line.
Regards!
 
Hi, Anil Bhatia!

As a new user you might want (I'd say should and must) read this:
http://chandoo.org/forum/forums/new-users-please-start-here.14/

Regards!

PS: Even your post isn't technically spam having been these kind of questions widely posted at the forums, please refrain from posting advertising-like (if not directly advertising) links, otherwise they'll be moderated and your account banned. One thing is that a contributor post a link to a software or service that might solve the OP's issue and another very different is that an employee of the company that sells the software or provides the service post an advertising link. Got it? Thank you.
 
Back
Top