Can someone point me to some working code that will allow a WEB form to be
loaded with a row of data from Excel.

Rick

RE: Load Web form with Excel row (code example) by OldPedant

OldPedant
Tue Jul 08 16:51:05 CDT 2008

Do you intend to do this with ASP, then? Using VBScript in ASP?

How will you determine *WHICH* row of the spreadsheet to display?

The code to open a spreadsheet is pretty simple; you just use the JET driver
and treat the ".xls" file as if it were an Access DB.

Look here:
http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForMicrosoftJet

And then scroll down to "You can also open an Excel Spreadsheet using the
JET OLE DB Provider".

If this isn't what you meant, please explain more.


Re: Load Web form with Excel row (code example) by McKirahan

McKirahan
Tue Jul 08 17:04:15 CDT 2008

"RICK" <RICK@discussions.microsoft.com> wrote in message
news:5D4DB0D4-5B3E-4C67-9DAE-8B992C12445E@microsoft.com...
> Can someone point me to some working code that will allow a WEB form to be
> loaded with a row of data from Excel.

A few questions:
1) What worksheet do you want to reference?
2) What identifies the row you want to use?
3) Which columns do you want to use?
4) Do the column headings match the form field names?






Re: Load Web form with Excel row (code example) by Tim

Tim
Wed Jul 09 00:51:38 CDT 2008

If you mean using VB[A|script] to automate IE then google for "IE
automation" (try in the Excel.programming group).

Since you're working from Excel it would be easier to use VBA in this case.
Here's a simple example which just fills text inputs with values from the
sheet. If you need to set dropdowns/radiobuttons etc then it gets more
complicated (but not much).

'**************************************************
Sub TestExtract()

Dim sht As Worksheet
Dim IE As Object

Set sht = ThisWorkbook.Sheets("Sheet1")
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate "http://www.somesite.com/formpage.html"

Do While IE.ReadyState <> 4 'READYSTATE_COMPLETE
DoEvents
Loop

With IE.document.formname
.formField1.Value = sht.Range("A2").Value
.formField2.Value = sht.Range("B2").Value
.formField3.Value = sht.Range("C2").Value
'.submit
End With

'no idea what you'd want to do next....
End Sub
'****************************************************

Tim



Tim



"RICK" <RICK@discussions.microsoft.com> wrote in message
news:5D4DB0D4-5B3E-4C67-9DAE-8B992C12445E@microsoft.com...
> Can someone point me to some working code that will allow a WEB form to be
> loaded with a row of data from Excel.
>
> Rick