M
MartinL
I need to run a report on a web page and import it to excel in an automatic
way.
First I need to open this company internal web page:
http://webha.kenmex.paccar.com/edc/default.aspx
and select the "1EDCMAT" report, here is part of the source code:
</select><br>
<span id="lblSelectReport">Select a saved report to
automatically load it</span><br>
<select name="selSavedReports"
onchange="__doPostBack('selSavedReports','')" language="javascript"
id="selSavedReports" tabindex="63">
<option value="0">-- Select a Report --</option>
selected="selected" value="932">1EDCMAT</option>
<option value="763">1EDCMAT x unidad</option>
and then I need to select todays date on the "Initiate Date" field:
<td><span id="lblInitiateDt">Initiate Date</span></td><td>
<table cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="WIDTH:80px"><input
name="txtInitiateDtFrom" type="text" id="txtInitiateDtFrom" tabindex="26"
onkeypress="return noenter()"
style="height:21px;width:80px;POSITION:absolute" /></td>
<td><IMG
onclick="javascript:OpenCalendar('document.frmReport.txtInitiateDtFrom')"
src="images/popupCalendarButton.gif"></td>
<td> - </td>
<td valign="top" style="WIDTH:80px"><input name="txtInitiateDtTo"
type="text" id="txtInitiateDtTo" tabindex="27" onkeypress="return noenter()"
style="height:21px;width:80px;POSITION:absolute" /></td>
<td><IMG
onclick="javascript:OpenCalendar('document.frmReport.txtInitiateDtTo')"
src="images/popupCalendarButton.gif"></td>
<td><span id="lblOptional6">(Optional)</span></td>
</tr>
</table>
</td>
</tr><tr>
and then hit the "Submit" button. After this an "Export to Excel" button
appears so I would like for this to be automatically imported into a specific
sheet in an excel file.
The thing is I would like to have this recorded as a VBA macro to import
this directly into any users excel. But I absolutely have no idea where to
start to make this work. I read thru some of the other posts but they are
very specific to a given web page. That's why I included the source code.
Any comments or suggestions are more than welcome!
Thanks, Martin L.
way.
First I need to open this company internal web page:
http://webha.kenmex.paccar.com/edc/default.aspx
and select the "1EDCMAT" report, here is part of the source code:
</select><br>
<span id="lblSelectReport">Select a saved report to
automatically load it</span><br>
<select name="selSavedReports"
onchange="__doPostBack('selSavedReports','')" language="javascript"
id="selSavedReports" tabindex="63">
<option value="0">-- Select a Report --</option>
selected="selected" value="932">1EDCMAT</option>
<option value="763">1EDCMAT x unidad</option>
and then I need to select todays date on the "Initiate Date" field:
<td><span id="lblInitiateDt">Initiate Date</span></td><td>
<table cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="WIDTH:80px"><input
name="txtInitiateDtFrom" type="text" id="txtInitiateDtFrom" tabindex="26"
onkeypress="return noenter()"
style="height:21px;width:80px;POSITION:absolute" /></td>
<td><IMG
onclick="javascript:OpenCalendar('document.frmReport.txtInitiateDtFrom')"
src="images/popupCalendarButton.gif"></td>
<td> - </td>
<td valign="top" style="WIDTH:80px"><input name="txtInitiateDtTo"
type="text" id="txtInitiateDtTo" tabindex="27" onkeypress="return noenter()"
style="height:21px;width:80px;POSITION:absolute" /></td>
<td><IMG
onclick="javascript:OpenCalendar('document.frmReport.txtInitiateDtTo')"
src="images/popupCalendarButton.gif"></td>
<td><span id="lblOptional6">(Optional)</span></td>
</tr>
</table>
</td>
</tr><tr>
and then hit the "Submit" button. After this an "Export to Excel" button
appears so I would like for this to be automatically imported into a specific
sheet in an excel file.
The thing is I would like to have this recorded as a VBA macro to import
this directly into any users excel. But I absolutely have no idea where to
start to make this work. I read thru some of the other posts but they are
very specific to a given web page. That's why I included the source code.
Any comments or suggestions are more than welcome!
Thanks, Martin L.