Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
download file of 200 name, addr.etc to excel file - how? please ad | Excel Worksheet Functions | |||
how to automate excel file sending by outlook from within the file | Excel Discussion (Misc queries) | |||
Download zip file & extract/open excel file | Excel Programming | |||
Excel add-in w/ Library.dll file, ? proper folder for the dll | Excel Discussion (Misc queries) | |||
download a .csv file to Excel | Excel Discussion (Misc queries) |