excel to web/ web scraping

oodai

New Member
Joined
Oct 13, 2010
Messages
4
The process that i do is very manual and repeating same kind of steps every day
Below is the detailed steps. Please help me with vba to automate this
Step 1 Copy the Banner Number from excel (Cell P3)
Step 2 Click on Search button in webpage
Step 3 Copy the store Number from excel
Click on search button (O3)
Step 4 Pick date from excel and paste in webpage (Cell G3)
Step 5 Update account and paste it in account (Cell I3 right 4 digits)

Select Each link in the page
Step 7 Once the page is opened take screen print of the page and save to a folder
Input
Html code
Copy the company Number from excel (Cell A2)
<input type="text" name="_cb_Control_ctl00_ManagedCompaniesComboBox" id="_cb_Control_ctl00_ManagedCompaniesComboBox" _id="ctl00_ManagedCompaniesComboBox" value="Manage a company..." class="NormalMode" _w="Manage a company..." style="width: 260px;" _quickfilter="" _quickfiltertype="5" _s="True" _e="False" *******="_cb_ClickIn(0, this, event);" onfocus="_cb_OnFocus(this);" onkeyup="return _cb_OnKeyDown(this, event);" onkeydown="return _cb_OnKeyDown(this, event, 1);">

Click on Search button in webpage
<div id="ctl00_NavigationContainer" class="NavigationContainer">
<span id="NavMenuTop"></span><span id="NavMenuBottom"></span>
<div class="NavMenu">
<div id="AjaxProcessing" style="display: none;">
<img src="MtxResource.asmx?r=Images/Loading.gif">Data Loading...
</div>

<div class="NavItem">
<a href="../Default.aspx">
<img src="MtxResource.asmx?r=Icons/Home.png" class="HomeIcon">Home</a>
</div><div class="NavItemSeparator">|</div>
<div class="NavItem">
<a href="TransactionSearch.aspx">
<img src="MtxResource.asmx?r=Icons/Search.png">Transaction Search</a>
</div><div class="NavItemSeparator">|</div>
<div class="NavItem">
<a href="../Reports/Reports.aspx">
<img src="MtxResource.asmx?r=Icons/Chart.png">Reports</a>
</div>
<div class="ClearLeft">
</div>
</div>
<div class="ClearBoth">
</div>
</div>

Copy the store Number from excel
Click on search button (O3)
<input type="text" name="_cb_Control_ctl00_MainContent_SearchWizard_SearchCriteriaStep_SearchCriteria_StoresComboBox" id="_cb_Control_ctl00_MainContent_SearchWizard_SearchCriteriaStep_SearchCriteria_StoresComboBox" _id="ctl00_MainContent_SearchWizard_SearchCriteriaStep_SearchCriteria_StoresComboBox" value="Select a Store..." class="NormalMode" _w="Select a Store..." style="width: 200px;" _quickfilter="" _quickfiltertype="5" _s="True" _e="False" *******="_cb_ClickIn(0, this, event);" onfocus="_cb_OnFocus(this);" onkeyup="return _cb_OnKeyDown(this, event);" onkeydown="return _cb_OnKeyDown(this, event, 1);">

Pick date from excel and paste in webpage (Cell G3)
<input name="ctl00$MainContent$SearchWizard$SearchCriteriaStep$SearchCriteria$SearchDates_TextBox" type="text" id="ctl00_MainContent_SearchWizard_SearchCriteriaStep_SearchCriteria_SearchDates_TextBox" style="margin-bottom:5px;" class="Watermark">



Update account and paste it in account (Cell I3 right 4 digits)
<input name="ctl00$MainContent$SearchWizard$SearchCriteriaStep$SearchCriteria$AccountLast4TextBox" type="text" id="ctl00_MainContent_SearchWizard_SearchCriteriaStep_SearchCriteria_AccountLast4TextBox" style="width:38px;" class="Watermark">


<input type="submit" name="ctl00$MainContent$SearchWizard$SearchCriteriaStep$SearchCriteria$SearchTransactionsButton" value="Search" *******="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$MainContent$SearchWizard$SearchCriteriaStep$SearchCriteria$SearchTransactionsButton", "", true, "", "", false, false))" id="ctl00_MainContent_SearchWizard_SearchCriteriaStep_SearchCriteria_SearchTransactionsButton">

Select Each link in the page

Once the page is opened take screen print of the page and save to a folder


<tbody>
</tbody>
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi Oodai,

and what code have you come up with so far?

Koen
 
Upvote 0

Forum statistics

Threads
1,215,511
Messages
6,125,250
Members
449,218
Latest member
daynle

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