LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Code to get data from webpage into Excel


Hi,

My company uses a cgi-bin within its network to submit information wit
various input and then posts resulting data in IE under the same URL.
know the name of the table that I want to import after the 'results
page has loaded and I can progmattically submit the information neede
on the 'submit' screen, but the URL never changes. So when I try t
create a new query to import my data, it will only recognize the table
on the submit screen! Is there anyway to get around this? I've trie
waiting until the 'results' page has loaded and excel still does no
recognize the tableID that is right there in the source code. Pleas
help! I'm goin insane.

What I have so far is:

Sub webdata()
Dim ie As Object
Dim test As Range
Dim iedoc As HTMLDocument


On Error GoTo 1
Set ie = CreateObject("InternetExplorer.Application")
With ie
.navigate "http://natoth/cgi-bin/eac_project_summary.pl"
.Visible = True
Do While .Busy: DoEvents: Loop ' Loop until page is loaded
Do While .readyState < 4: DoEvents: Loop
With .document.forms("F001") ' form name goes in ()
.project_id_pulldown.Value = proj 'all form values listed below
.xl_or_html.Value = "XL"
.dept_id.Value = "L" & dept
.output_format.Value = "EST"
.submit 'submit form values

End With

End With

<Here I need to import table("projectstatus") to Sheet1.rangeA1


Set ie = Nothing
Exit Sub
1: MsgBox "Unexpected Error, sorry."

Set ie = Nothing



Best Regards,
Mjac

--
mjack00
-----------------------------------------------------------------------
mjack003's Profile: http://www.excelforum.com/member.php...nfo&userid=514
View this thread: http://www.excelforum.com/showthread.php?threadid=48356

 
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
Importing webpage data into Excel Dave Excel Discussion (Misc queries) 4 May 21st 07 09:04 PM
Linking Webpage to Excel Data Taier Excel Worksheet Functions 1 November 19th 05 12:43 AM
In Excel 2000 can you write VBA code to pull data from a webpage? kurt Excel Programming 2 September 24th 04 05:59 AM
In Excel 2000 can you write VBA code to pull data from a webpage? kurt Excel Programming 1 September 24th 04 01:26 AM
Open Webpage and then Run Code Nick Excel Programming 0 November 18th 03 10:31 PM


All times are GMT +1. The time now is 09:52 AM.

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

About Us

"It's about Microsoft Excel"