Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 12:31
pepemosca pepemosca is offline
Registered User
 
Join Date: Apr 2008
Posts: 167
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, 13:06
georgev georgev is offline
SQL Apprentice
 
Join Date: Jan 2007
Location: hiding
Posts: 8,131
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
You only stop learning when you stop asking questions.
Reply With Quote
  #3 (permalink)  
Old 05-27-08, 14:43
pepemosca pepemosca is offline
Registered User
 
Join Date: Apr 2008
Posts: 167
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, 14:44
pepemosca pepemosca is offline
Registered User
 
Join Date: Apr 2008
Posts: 167
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, 14:47
pepemosca pepemosca is offline
Registered User
 
Join Date: Apr 2008
Posts: 167
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, 10:59
pepemosca pepemosca is offline
Registered User
 
Join Date: Apr 2008
Posts: 167
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

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