If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Extract data from an ASP server with Excel?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-27-08, 11:31
pepemosca pepemosca is offline
Registered User
 
Join Date: Apr 2008
Posts: 189
Question 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!
Reply With Quote
  #2 (permalink)  
Old 05-27-08, 12:06
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
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
Twitter | Blog
Reply With Quote
  #3 (permalink)  
Old 05-27-08, 13:43
pepemosca pepemosca is offline
Registered User
 
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?
Reply With Quote
  #4 (permalink)  
Old 05-27-08, 13:44
pepemosca pepemosca is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 05-27-08, 13:47
pepemosca pepemosca is offline
Registered User
 
Join Date: Apr 2008
Posts: 189
Do you know how to use code like this: http://www.dailydoseofexcel.com/arch...rnet-explorer/ ?
Reply With Quote
  #6 (permalink)  
Old 06-03-08, 09:59
pepemosca pepemosca is offline
Registered User
 
Join Date: Apr 2008
Posts: 189
No ideas in how to use code like that?

Thanks for your comments.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On