Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2008
    Posts
    189

    Question Unanswered: Extract data from an ASP server with Excel?

    Hello,
    Does anyone has a method to extract data from an ASP server using Excel?

    I want to extract data from a server like this one:
    http://energia.mecon.gov.ar/upstream/US_MPerf.asp

    So, what I need is to create all the options and "press" "<< Consultar >>" and get the data.

    Is easy to do it when you have a PHP server, where I will do something like:
    http://energia.mecon.gov.ar/upstream/US_MPerf.asp?Anio=2007&Mes=1

    But with this ASP servers... I don't know how

    Ideas?
    Thanks!

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    your question does not make sense to me; if it was PHP how would you achieve this?

    The bit on the end of the url (everything after the question mark (?)) is called a querystring; which is not PHP specific - in fact they're used widely in ASP, too!
    George
    Home | Blog

  3. #3
    Join Date
    Apr 2008
    Posts
    189
    I will use this:
    http://img261.imageshack.us/img261/7008/dibujohk3.jpg

    But that doesn't work with with this page:
    http://energia.mecon.gov.ar/upstream/US_MPerf.asp

    Any ideas how to copy that page?

  4. #4
    Join Date
    Apr 2008
    Posts
    189
    And use this code:

    Code:
    'La consulta en si misma
    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;" & vURL _
        , Destination:=Range("H" & vFilaUltima + 1))
        .Name = _
        "Import"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = False
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = False
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlEntirePage
        .WebFormatting = xlWebFormattingNone
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With

  5. #5
    Join Date
    Apr 2008
    Posts
    189
    Do you know how to use code like this: http://www.dailydoseofexcel.com/arch...rnet-explorer/ ?

  6. #6
    Join Date
    Apr 2008
    Posts
    189
    No ideas in how to use code like that?

    Thanks for your comments.

Posting Permissions

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