Fill web form from Excel

black_smith

New Member
Joined
Dec 7, 2012
Messages
1
I am a new user to Excel, and new to macros so bear with me.

I am working on a project to transfer all the data from a spreadsheet and
enter it into an online form. I have Usernames and Passwords (D8:E656) in the spreadsheet to fill it in on the website. I am trying to write a macro to do this for me.

Here is step by step info.
1) Copy the Username and Password (D8:E8) from spreadsheet.
2) Open the website (I do apologize.. I can't post the link for the security purpose. but i have attached html webpage alongwith this post. So please check it.) using mozilla firefox and enter the webaddress. (Wait till it is fully opens)
3) Paste the Username and Password on the webform & click on "Go" to submit.
4) Click on "Inbox","Order" & "Logout" respectively.

Repeat the same procedure with all the Usernames & Passwords

Sorry if this question seems idiotic but I'm lost.

Noorie, please help me if you're reading this post.

Below is html code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
****** http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>www.xyz.com</title>
******** language="JavaScript" src="/ebgas/pages/jspimages/valjavavalidate_new.js">*********>
******** type="text/javascript" src="crawler.js">
*********>
******** type="text/javascript">
function getEmailValidation(){
if (checkempty(document.homenewsletter.txtemailid,"Please enter emailid")==false) return false;
if (checkemail_new(document.homenewsletter.txtemailid,"Enter proper E-Mail Id such as 'abc@xyz.com'")==false) return false;
return true;
}
function NewsletterWindow(mypage,myname,w,h,scroll){

if(getEmailValidation()==true){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
var combotype=document.homenewsletter.selnews.options[document.homenewsletter.selnews.selectedIndex].value;
if (combotype=='N'){
mypage="/ebgas/pages/newssubscriptionv.jsp" + "?emailid=" + document.homenewsletter.txtemailid.value + "&option=2&todo=S"

}
if (combotype=='Q'){
mypage="http://www.xyz.com/subscriptionv.asp" + "?emailid=" + document.homenewsletter.txtemailid.value + "&option=3" ;
}
win = ************(mypage,myname,settings)

document.homenewsletter.submit();
}


}

*********>

<link rel="stylesheet" type="text/css"
href="scripts/ddlevelsmenu-base.css" />
<link rel="stylesheet" type="text/css"
href="scripts/ddlevelsmenu-topbar.css" />
<link rel="stylesheet" type="text/css"
href="scripts/ddlevelsmenu-sidebar.css" />
<link href="Style.css" rel="stylesheet" type="text/css" />

******** type="text/javascript" src="scripts/ddlevelsmenu.js">
*********>

<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
******** src="scripts/AC_RunActiveContent.js" type="text/javascript">*********>
</head>
<body>
<div align="center">
<table width="98%" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td valign="top">
<table width="98%" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td style="width: 100%; height: 119px;">********
type="text/javascript" src="Header_index.js" language="JavaScript">
*********> ******** type="text/javascript">
ddlevelsmenu.setup("ddtopmenubar", "topbar") //ddlevelsmenu.setup("mainmenuid", "topbar|sidebar")
*********></td>
</tr>
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="421" align="right" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle">********
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
width="638px" height="421px">
<param name="wmode" value="transparent" />
<param name="movie" value="baner.swf" />
<param name="quality" value="high" />
<embed src="baner.swf" wmode="transparent" width="638"
height="421" vspace="12" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash"></embed> </object></td>
</tr>
</table>
</td>
<td width="345" align="right" valign="top"
class="border_left_line">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
<tr>
<td>
<table width="100%" border="0" align="right" cellpadding="0"
cellspacing="0">
<tr>
<td width="1" class="vertical_line"></td>
<td width="7px"></td>
<td width="336" align="right" valign="top">
<table width="100%" border="0" align="right" cellpadding="0"
cellspacing="0">
<tr>
<td width="100%" align="left" valign="top"
style="width: 100%; height: 90px;">
******** class="Cust_Login" src="/ebgas/logonForm-index.jsp"
style="width: 100%; height: 90px" frameborder="0" scrolling="no" align="top">*********>
</td>
</tr>
<tr>
<td height="5"></td>
</tr>

<tr>
<td align="right">
<table width="100%" border="0" align="right" cellpadding="0"
cellspacing="0" class="Login_border">
<tr>
<td align="center">
<table width="96%" border="0" align="center"
cellpadding="2" cellspacing="0">
<tr>
<td colspan="2" align="left" class="heading">Register
For</td>
</tr>
<tr>
<td width="5%" align="left" class="left_link1">»</td>
<td align="left" class="news_link">
<a href="Customer_Console/New_Domestic_Connection.html" target="_top"
class="news_link">New Domestic LPG Connection</a></td>
</tr>
<tr>
<td width="5%" align="left" class="left_link1">»</td>
<td align="left" class="news_link">
<a href="Customer_Console/Customer_New_Register.html" target="_top"
class="news_link">Online / SMS Booking </a></td>
</tr>
<tr>
<td width="5%" align="left" class="left_link1">»</td>
<td align="left" class="news_link">
<a href="/pages/Customer_Console/Services_Preferred_Time_Delivery.html" target="_top"
class="news_link">Preferred Time Delivery</a></td>
</tr>

</table>
</td>
</tr>

<tr>
<td width="100%" align="left" valign="top"
style="width: 100%; height: 60px;">********
class="Cust_Login" src="/ebgas/CC_include/News_Update_include.jsp"
style="width: 100%; height: 60px" frameborder="0"
scrolling="no" align="top">*********></td>
</tr>
<tr valign="top">
<td align="center">
<form name="homenewsletter" id="homenewsletter" method="post">
<table width="96%" border="0" align="center"
cellpadding="2" cellspacing="0">
<tr>
<td height="10" colspan="3" align="left" class="heading"></td>
</tr>
<tr>
<td colspan="3" align="left" class="heading">Subscriptions</td>
</tr>
<tr>
<td width="128" align="left"><a href="#">
<select name="selnews" class="form_input_text">
<option selected value="N">Newsletter</option>
<option value="Q">Quotations</option>
</select> </a></td>
<td width="108" align="left">
<input name="txtemailid" onFocus="javascript:document.homenewsletter.txtemailid.value=''" type="text" value="Enter Email ID"
size="17" /></td>
<td width="60" align="left"><a href="#"><img
src="images/Button_Login_Go.jpg" width="26" height="20"
border="0" *******="NewsletterWindow(this.href,'news','500','300','yes')" /></a></td>
</tr>
<tr>
<td height="10" colspan="3" align="left" class="heading"></td>
</tr>
</form>
</table>
</td>
</tr>

</table>
</td>
</tr>
<tr>
<td height="5"></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td align="center" valign="top">********
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
width="340" height="124" vspace="0">
<param name="wmode" value="transparent" />
<param name="movie" value="bottom_baner.swf" />
<param name="quality" value="high" />
<embed src="bottom_baner.swf" wmode="transparent"
width="340" height="124" vspace="0" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash"></embed> </object></td>
</tr>
<tr>
<td height="5"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" style="width: 100%; height: 88px;">********
src="include/Home_footer_include.html"
style="height: 88px; width: 100%;" frameborder="0" scrolling="No">*********></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,223,246
Messages
6,170,999
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top