Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Automate Excel download of csv file without proper URL?

I am looking for a way to automate downloading natural gas market data
that is available he

https://www.services.nymex.com/otcse.../OTCSettle.jsp

The Usage agreement must be agreed to and then the link "Download all
available OTC settlement data" must be clicked prompting a CSV
download. I then need to copy this all into an excel sheet and can
take it from there.

Note: the link that prompts the download doesn't have a URL but is
"javascript:__doPostBack('ctl00$btnExport','') "

Is there a way to do this with web query?

Help is much appreciated. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Automate Excel download of csv file without proper URL?

Hello,
The following is unfortunately incomplete as I can't seem to find the
appropriate command to click the submit image, or submit the form/page. Hope
someone will help on that.

---------------------------------------------------
Sub download_csv()
Dim IE As New InternetExplorer, web_item, a, x

IE.Visible = True
IE.Navigate "https://www.services.nymex.com/otcsettlement/OTCSettle.jsp"
Do Until IE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop

'Agrees with the Disclaimer form
If IE.LocationURL Like "*disclaimer*" Then
'Selects 'I agree'
IE.Document.Links(4).Click

'submits the form
!!!!!! PROBLEM HERE !!!!!!

End If

Do Until IE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop

'clicks on "Download all available..."
IE.Document.all.Item("ctl00_btnExport").Click

End Sub
---------------------------------------------------


" wrote:

I am looking for a way to automate downloading natural gas market data
that is available he

https://www.services.nymex.com/otcse.../OTCSettle.jsp

The Usage agreement must be agreed to and then the link "Download all
available OTC settlement data" must be clicked prompting a CSV
download. I then need to copy this all into an excel sheet and can
take it from there.

Note: the link that prompts the download doesn't have a URL but is
"javascript:__doPostBack('ctl00$btnExport','') "

Is there a way to do this with web query?

Help is much appreciated. Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Automate Excel download of csv file without proper URL?

Thanks so much for your help, I'm on the right track now!

On Dec 28 2007, 7:06 am, The Dude <f_com2°AT°yahoo°DOT°fr wrote:
Hello,
The following is unfortunately incomplete as I can't seem to find the
appropriate command to click the submit image, or submit the form/page. Hope
someone will help on that.

---------------------------------------------------
Sub download_csv()
Dim IE As New InternetExplorer, web_item, a, x

IE.Visible = True
IE.Navigate "https://www.services.nymex.com/otcsettlement/OTCSettle.jsp"
Do Until IE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop

'Agrees with the Disclaimer form
If IE.LocationURL Like "*disclaimer*" Then
'Selects 'I agree'
IE.Document.Links(4).Click

'submits the form
!!!!!! PROBLEM HERE !!!!!!

End If

Do Until IE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop

'clicks on "Download all available..."
IE.Document.all.Item("ctl00_btnExport").Click

End Sub
---------------------------------------------------

" wrote:
I am looking for a way to automate downloading natural gas market data
that is available he


https://www.services.nymex.com/otcse.../OTCSettle.jsp


The Usage agreement must be agreed to and then the link "Download all
available OTC settlement data" must be clicked prompting a CSV
download. I then need to copy this all into an excel sheet and can
take it from there.


Note: the link that prompts the download doesn't have a URL but is
"javascript:__doPostBack('ctl00$btnExport','') "


Is there a way to do this with web query?


Help is much appreciated. Thanks.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
download file of 200 name, addr.etc to excel file - how? please ad Tony V. Excel Worksheet Functions 1 October 24th 08 09:50 AM
how to automate excel file sending by outlook from within the file Adrian Excel Discussion (Misc queries) 1 September 12th 08 01:59 PM
Download zip file & extract/open excel file Mika Excel Programming 6 May 27th 07 10:02 PM
Excel add-in w/ Library.dll file, ? proper folder for the dll MoldMan Excel Discussion (Misc queries) 0 April 26th 06 10:27 PM
download a .csv file to Excel acwerth Excel Discussion (Misc queries) 3 February 15th 05 10:21 PM


All times are GMT +1. The time now is 05:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"