Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pls Help! Sending data to an IE web form.
I'm trying to send data from an excel (2007) spreadsheet to an IE (6) web
form. Can someone suggest the best method possible? I've tried sendkeys, and it only works sometimes. Thanks, Don |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pls Help! Sending data to an IE web form.
You can automate IE from within Excel using VBA.
Google for "IE automation". Tim. "DW" wrote in message ... I'm trying to send data from an excel (2007) spreadsheet to an IE (6) web form. Can someone suggest the best method possible? I've tried sendkeys, and it only works sometimes. Thanks, Don |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pls Help! Sending data to an IE web form.
Thanks Tim.....I did find something out on Tek-Tips.com...using the
getfields/setfields......I'll see how that will work. Don "Tim Williams" <timjwilliams at gmail dot com wrote in message ... You can automate IE from within Excel using VBA. Google for "IE automation". Tim. "DW" wrote in message ... I'm trying to send data from an excel (2007) spreadsheet to an IE (6) web form. Can someone suggest the best method possible? I've tried sendkeys, and it only works sometimes. Thanks, Don |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pls Help! Sending data to an IE web form.
On Apr 9, 11:10 pm, "DW" wrote:
I'm trying to send data from an excel (2007) spreadsheet to an IE (6)web form. Can someone suggest the best method possible? I've tried sendkeys, and it only works sometimes. Thanks, Don You can try SWExplorerAutomation (SWEA) from http://webiussoft.com. SWEA is very reliable, fast IE automation framework. SWEA records automation scripts and generates C# or VB.NET code. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pls Help! Sending data to an IE web form.
Thanks alex and Tim, but this is not anything that needs C or VB. The
spreadsheet just has a list of #'s that need to be sent to a web page so information can then be viewed on that web page. Just something to eliminate a lot of cutting and pasting. In the past (XL 2003), I used (for this project) sendkeys commands and they worked great. Now, with 2007 (XL 2007 Standard), they do not always hit the fields on the web page (or at least do not seem to). Here's what I've been using so far (userid's and passwords changed to protect the innocent :) ). What I'd like to be able to do, is change this to something better, in the event the webmaster changes the site, AND even tho this runs quick, so the user can do something else besides twiddle their thumbs. Thanks, Don Spreadsheet List Example: 27278 28234 29362 29379 29550 29552 29554 29556 30091 30094 Code: Sub tabIE() Dim objIE As Object Dim response As String Dim msg As String msg = "How many items are you checking?" response = InputBox(msg) Set objIE = CreateObject("InternetExplorer.Application") With objIE .Visible = True .navigate "https://www.smcorp.com/weborder/smc_stockchk.asp?mscssid=22895545+++++++++++++++++ +++++++" .resizable = True End With Application.Wait (Now + TimeValue("0:00:30")) SendKeys "USERID" SendKeys "{TAB}" SendKeys "PASSWORD" Application.Wait (Now + TimeValue("0:00:01")) SendKeys "~" Application.Wait (Now + TimeValue("0:00:05")) Call tabIE2(response) ActiveWorkbook.Save Set objIE = Nothing End Sub Sub tabIE2(response As String) Dim msg As String SendKeys response SendKeys "~" Application.Wait (Now + TimeValue("0:00:03")) For k = 1 To 10 SendKeys "{TAB}" Next k Application.Wait (Now + TimeValue("0:00:01")) For j = 1 To 17 SendKeys "{TAB}" Next j Application.Wait (Now + TimeValue("0:00:01")) For i = 0 To response SendKeys ActiveCell.Value SendKeys "{TAB}" Application.Wait (Now + TimeValue("0:00:01")) If i = 0 Then Selection.Font.ColorIndex = 3 Else If i = response Then ActiveCell.Cells(1, 2).Activate msg = "Left off here" ActiveCell.FormulaR1C1 = msg ActiveCell.Cells(1, -1).Activate End If End If ActiveCell.Cells(2, 1).Select Next i Application.Wait (Now + TimeValue("0:00:01")) SendKeys "~" End Sub "alex" wrote in message oups.com... On Apr 9, 11:10 pm, "DW" wrote: I'm trying to send data from an excel (2007) spreadsheet to an IE (6)web form. Can someone suggest the best method possible? I've tried sendkeys, and it only works sometimes. Thanks, Don You can try SWExplorerAutomation (SWEA) from http://webiussoft.com. SWEA is very reliable, fast IE automation framework. SWEA records automation scripts and generates C# or VB.NET code. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pls Help! Sending data to an IE web form.
On Apr 11, 2:03 pm, "DW" wrote:
Thanks alex and Tim, but this is not anything that needs C or VB. The spreadsheet just has a list of #'s that need to be sent to a web page so information can then be viewed on that web page. Just something to eliminate a lot of cutting and pasting. In the past (XL 2003), I used (for this project) sendkeys commands and they worked great. Now, with 2007 (XL 2007 Standard), they do not always hit the fields on the web page (or at least do not seem to). Here's what I've been using so far (userid's and passwords changed to protect the innocent :) ). What I'd like to be able to do, is change this to something better, in the event the webmaster changes the site, AND even tho this runs quick, so the user can do something else besides twiddle their thumbs. Thanks, Don Spreadsheet List Example: 27278 28234 29362 29379 29550 29552 29554 29556 30091 30094 Code: Sub tabIE() Dim objIE As Object Dim response As String Dim msg As String msg = "How many items are you checking?" response = InputBox(msg) Set objIE = CreateObject("InternetExplorer.Application") With objIE .Visible = True .navigate "https://www.smcorp.com/weborder/smc_stockchk.asp?mscssid=22895545++++..." .resizable = True End With Application.Wait (Now + TimeValue("0:00:30")) SendKeys "USERID" SendKeys "{TAB}" SendKeys "PASSWORD" Application.Wait (Now + TimeValue("0:00:01")) SendKeys "~" Application.Wait (Now + TimeValue("0:00:05")) Call tabIE2(response) ActiveWorkbook.Save Set objIE = Nothing End Sub Sub tabIE2(response As String) Dim msg As String SendKeys response SendKeys "~" Application.Wait (Now + TimeValue("0:00:03")) For k = 1 To 10 SendKeys "{TAB}" Next k Application.Wait (Now + TimeValue("0:00:01")) For j = 1 To 17 SendKeys "{TAB}" Next j Application.Wait (Now + TimeValue("0:00:01")) For i = 0 To response SendKeys ActiveCell.Value SendKeys "{TAB}" Application.Wait (Now + TimeValue("0:00:01")) If i = 0 Then Selection.Font.ColorIndex = 3 Else If i = response Then ActiveCell.Cells(1, 2).Activate msg = "Left off here" ActiveCell.FormulaR1C1 = msg ActiveCell.Cells(1, -1).Activate End If End If ActiveCell.Cells(2, 1).Select Next i Application.Wait (Now + TimeValue("0:00:01")) SendKeys "~" End Sub "alex" wrote in message oups.com... On Apr 9, 11:10 pm, "DW" wrote: I'm trying to send data from an excel (2007) spreadsheet to an IE (6)web form. Can someone suggest the best method possible? I've tried sendkeys, and it only works sometimes. Thanks, Don You can try SWExplorerAutomation (SWEA) fromhttp://webiussoft.com. SWEAis very reliable, fast IE automation framework. SWEArecords automation scripts and generates C# or VB.NET code.- Hide quoted text - - Show quoted text - Don, You can use C# or VB.NET(http://msdn2.microsoft.com/en-us/library/ aa168292(office.11).aspx) in Excel instead VB for applications you use in the script. -Alex |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pls Help! Sending data to an IE web form.
You're already using VB(A) and automation, so just ditch the sendkeys and
use the HTML document object model instead. If the webmaster changes the basic site design/layout it *will* break your code, whatever approach you use. Tim "DW" wrote in message ... Thanks alex and Tim, but this is not anything that needs C or VB. The spreadsheet just has a list of #'s that need to be sent to a web page so information can then be viewed on that web page. Just something to eliminate a lot of cutting and pasting. In the past (XL 2003), I used (for this project) sendkeys commands and they worked great. Now, with 2007 (XL 2007 Standard), they do not always hit the fields on the web page (or at least do not seem to). Here's what I've been using so far (userid's and passwords changed to protect the innocent :) ). What I'd like to be able to do, is change this to something better, in the event the webmaster changes the site, AND even tho this runs quick, so the user can do something else besides twiddle their thumbs. Thanks, Don Spreadsheet List Example: 27278 28234 29362 29379 29550 29552 29554 29556 30091 30094 Code: Sub tabIE() Dim objIE As Object Dim response As String Dim msg As String msg = "How many items are you checking?" response = InputBox(msg) Set objIE = CreateObject("InternetExplorer.Application") With objIE .Visible = True .navigate "https://www.smcorp.com/weborder/smc_stockchk.asp?mscssid=22895545+++++++++++++++++ +++++++" .resizable = True End With Application.Wait (Now + TimeValue("0:00:30")) SendKeys "USERID" SendKeys "{TAB}" SendKeys "PASSWORD" Application.Wait (Now + TimeValue("0:00:01")) SendKeys "~" Application.Wait (Now + TimeValue("0:00:05")) Call tabIE2(response) ActiveWorkbook.Save Set objIE = Nothing End Sub Sub tabIE2(response As String) Dim msg As String SendKeys response SendKeys "~" Application.Wait (Now + TimeValue("0:00:03")) For k = 1 To 10 SendKeys "{TAB}" Next k Application.Wait (Now + TimeValue("0:00:01")) For j = 1 To 17 SendKeys "{TAB}" Next j Application.Wait (Now + TimeValue("0:00:01")) For i = 0 To response SendKeys ActiveCell.Value SendKeys "{TAB}" Application.Wait (Now + TimeValue("0:00:01")) If i = 0 Then Selection.Font.ColorIndex = 3 Else If i = response Then ActiveCell.Cells(1, 2).Activate msg = "Left off here" ActiveCell.FormulaR1C1 = msg ActiveCell.Cells(1, -1).Activate End If End If ActiveCell.Cells(2, 1).Select Next i Application.Wait (Now + TimeValue("0:00:01")) SendKeys "~" End Sub "alex" wrote in message oups.com... On Apr 9, 11:10 pm, "DW" wrote: I'm trying to send data from an excel (2007) spreadsheet to an IE (6)web form. Can someone suggest the best method possible? I've tried sendkeys, and it only works sometimes. Thanks, Don You can try SWExplorerAutomation (SWEA) from http://webiussoft.com. SWEA is very reliable, fast IE automation framework. SWEA records automation scripts and generates C# or VB.NET code. |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pls Help! Sending data to an IE web form.
ic....thanks
"Tim" <tim j williams at gmail dot com wrote in message ... You're already using VB(A) and automation, so just ditch the sendkeys and use the HTML document object model instead. If the webmaster changes the basic site design/layout it *will* break your code, whatever approach you use. Tim "DW" wrote in message ... Thanks alex and Tim, but this is not anything that needs C or VB. The spreadsheet just has a list of #'s that need to be sent to a web page so information can then be viewed on that web page. Just something to eliminate a lot of cutting and pasting. In the past (XL 2003), I used (for this project) sendkeys commands and they worked great. Now, with 2007 (XL 2007 Standard), they do not always hit the fields on the web page (or at least do not seem to). Here's what I've been using so far (userid's and passwords changed to protect the innocent :) ). What I'd like to be able to do, is change this to something better, in the event the webmaster changes the site, AND even tho this runs quick, so the user can do something else besides twiddle their thumbs. Thanks, Don Spreadsheet List Example: 27278 28234 29362 29379 29550 29552 29554 29556 30091 30094 Code: Sub tabIE() Dim objIE As Object Dim response As String Dim msg As String msg = "How many items are you checking?" response = InputBox(msg) Set objIE = CreateObject("InternetExplorer.Application") With objIE .Visible = True .navigate "https://www.smcorp.com/weborder/smc_stockchk.asp?mscssid=22895545+++++++++++++++++ +++++++" .resizable = True End With Application.Wait (Now + TimeValue("0:00:30")) SendKeys "USERID" SendKeys "{TAB}" SendKeys "PASSWORD" Application.Wait (Now + TimeValue("0:00:01")) SendKeys "~" Application.Wait (Now + TimeValue("0:00:05")) Call tabIE2(response) ActiveWorkbook.Save Set objIE = Nothing End Sub Sub tabIE2(response As String) Dim msg As String SendKeys response SendKeys "~" Application.Wait (Now + TimeValue("0:00:03")) For k = 1 To 10 SendKeys "{TAB}" Next k Application.Wait (Now + TimeValue("0:00:01")) For j = 1 To 17 SendKeys "{TAB}" Next j Application.Wait (Now + TimeValue("0:00:01")) For i = 0 To response SendKeys ActiveCell.Value SendKeys "{TAB}" Application.Wait (Now + TimeValue("0:00:01")) If i = 0 Then Selection.Font.ColorIndex = 3 Else If i = response Then ActiveCell.Cells(1, 2).Activate msg = "Left off here" ActiveCell.FormulaR1C1 = msg ActiveCell.Cells(1, -1).Activate End If End If ActiveCell.Cells(2, 1).Select Next i Application.Wait (Now + TimeValue("0:00:01")) SendKeys "~" End Sub "alex" wrote in message oups.com... On Apr 9, 11:10 pm, "DW" wrote: I'm trying to send data from an excel (2007) spreadsheet to an IE (6)web form. Can someone suggest the best method possible? I've tried sendkeys, and it only works sometimes. Thanks, Don You can try SWExplorerAutomation (SWEA) from http://webiussoft.com. SWEA is very reliable, fast IE automation framework. SWEA records automation scripts and generates C# or VB.NET code. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sending data from a form to another worksheet | Excel Discussion (Misc queries) | |||
Sending a Form | Excel Discussion (Misc queries) | |||
Sending Excel Data to a Coldfusion Form | Excel Programming | |||
Sending Form Focus? | Excel Programming | |||
Sending Excel form to Exchange Folder | Excel Programming |