1

I've posted a question earlier and I ran into another problem.

I have a website www.abc.com with 2 pages www.abc.com/a and www.abc.com/b

I need to extract data from page b by navigating from www.abc.com, based on the user input.

pseudo code would be something like this

  1. prompt user for input (if input is 'b')
  2. goto www.abc.com
  3. search for page www.abc.com/(user input). In this case www.abc.com/b
  4. extract data from this page into excel sheet or a simple text file etc.

Is there a language which would be help me in achieving this task ? Can we do this in VBA ?

Thanks

user3547407
  • 187
  • 1
  • 12
  • This certainly sounds possible, but your question is a bit to vague and general to offer any specific advice. VBA sounds like it might be possible but not fun. – Rose Kunkel Apr 19 '14 at 02:59
  • See if this helps [link1](http://stackoverflow.com/questions/22353665/get-data-from-website-screen-to-excel-with-form-vba/22354302#22354302) & [link2 using xmlhttp](http://stackoverflow.com/questions/17495644/using-vba-in-excel-to-google-search-in-ie-and-return-the-hyperlink-of-the-first/17499488#17499488) – Santosh Apr 19 '14 at 03:01
  • Yes I've looked at VBA and I guess it's definitely possible but the semantics of that language seem to be very old fashioned. Just as you said it might not be fun. But if I don't find any alternative language then I will go with it. Thanks for you help :) – user3547407 Apr 19 '14 at 03:05

1 Answers1

0

The easiest way to do this using VBA would be with the built-in WebBrowser Control (some examples here) which allows you to see what's going on at the same time as it's happening. Also, it allows for great portability and keeps everything in one place.

You'll probably need to find yourself a beginner's VBA tutorial, and have some HTML understanding, but it's all basic and easy-going.


Another simple approach :

  1. Download the HTML file directly from the URL
  2. Parse the file
  3. Extract the informations to an excel file

Chances are, the language you're most accustomed to will let you do this.

Bernard Saucier
  • 2,240
  • 1
  • 19
  • 28