PC Review


Reply
Thread Tools Rate Thread

Activating javascript with excel

 
 
=?Utf-8?B?amFzb24zNg==?=
Guest
Posts: n/a
 
      20th Sep 2007
I have a problem where I want to access a website, run a query on that
particular page of the website by activating buttons displayed on the web
page and then activate a javascript command to export the data to excel. I
am using Excel 2003 Professional. Is there any way possible of automating my
problem.
--
jason36
 
Reply With Quote
 
 
 
 
Randy Harmelink
Guest
Posts: n/a
 
      20th Sep 2007
Might be possible. But it would depend entirely upon the details.
What web page are you trying to automate?

On Sep 20, 2:24 am, jason36 <jaso...@discussions.microsoft.com> wrote:
> I have a problem where I want to access a website, run a query on that
> particular page of the website by activating buttons displayed on the web
> page and then activate a javascript command to export the data to excel. I
> am using Excel 2003 Professional. Is there any way possible of automating my
> problem.


 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      20th Sep 2007
If you're using the web page directly how do you run the Excel export ?
Button? Link?

Tim


"jason36" <(E-Mail Removed)> wrote in message
news:553B4978-0237-41C1-8FE9-(E-Mail Removed)...
>I have a problem where I want to access a website, run a query on that
> particular page of the website by activating buttons displayed on the web
> page and then activate a javascript command to export the data to excel.
> I
> am using Excel 2003 Professional. Is there any way possible of automating
> my
> problem.
> --
> jason36



 
Reply With Quote
 
=?Utf-8?B?amFzb24zNg==?=
Guest
Posts: n/a
 
      21st Sep 2007
Tim,

The button to pull up the list of queries in the web source code is :

<input class="button" id="btnLoad" style="WIDTH: 75px"
onclick="javascript:loadQuery();"type="button" value="Load">

Followed by a link to export to an excel spreadsheet :

<br>--><a id="hlExport" href="javascript:exportExcel();">Export to
Excel</a><br>

The excel spreadsheet created always has the same name so that would be the
easy part, it's just the two parts in the automation process above that has
got me stumped.

Many Thanks

--
jason36


"Tim Williams" wrote:

> If you're using the web page directly how do you run the Excel export ?
> Button? Link?
>
> Tim
>
>
> "jason36" <(E-Mail Removed)> wrote in message
> news:553B4978-0237-41C1-8FE9-(E-Mail Removed)...
> >I have a problem where I want to access a website, run a query on that
> > particular page of the website by activating buttons displayed on the web
> > page and then activate a javascript command to export the data to excel.
> > I
> > am using Excel 2003 Professional. Is there any way possible of automating
> > my
> > problem.
> > --
> > jason36

>
>
>

 
Reply With Quote
 
=?Utf-8?B?amFzb24zNg==?=
Guest
Posts: n/a
 
      21st Sep 2007
Randy,

Unfortunately, i'ts restricted to the company I work for but the gist of
what I need to do is in the reply to Tim.

Regards--
jason36


"Randy Harmelink" wrote:

> Might be possible. But it would depend entirely upon the details.
> What web page are you trying to automate?
>
> On Sep 20, 2:24 am, jason36 <jaso...@discussions.microsoft.com> wrote:
> > I have a problem where I want to access a website, run a query on that
> > particular page of the website by activating buttons displayed on the web
> > page and then activate a javascript command to export the data to excel. I
> > am using Excel 2003 Professional. Is there any way possible of automating my
> > problem.

>
>

 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      22nd Sep 2007
For the button this should work:
IE.document.getElementById("btnLoad").click

Where IE is your reference to the browser app.


For the link this might also work:
IE.document.getElementById("hlExport").click

....but it really depends on what happens in the js 'exportExcel()' function.

Tim


"jason36" <(E-Mail Removed)> wrote in message
news:A7DF5E1E-FD24-453A-A587-(E-Mail Removed)...
> Tim,
>
> The button to pull up the list of queries in the web source code is :
>
> <input class="button" id="btnLoad" style="WIDTH: 75px"
> onclick="javascript:loadQuery();"type="button" value="Load">
>
> Followed by a link to export to an excel spreadsheet :
>
> <br>--><a id="hlExport" href="javascript:exportExcel();">Export to
> Excel</a><br>
>
> The excel spreadsheet created always has the same name so that would be
> the
> easy part, it's just the two parts in the automation process above that
> has
> got me stumped.
>
> Many Thanks
>
> --
> jason36
>
>
> "Tim Williams" wrote:
>
>> If you're using the web page directly how do you run the Excel export ?
>> Button? Link?
>>
>> Tim
>>
>>
>> "jason36" <(E-Mail Removed)> wrote in message
>> news:553B4978-0237-41C1-8FE9-(E-Mail Removed)...
>> >I have a problem where I want to access a website, run a query on that
>> > particular page of the website by activating buttons displayed on the
>> > web
>> > page and then activate a javascript command to export the data to
>> > excel.
>> > I
>> > am using Excel 2003 Professional. Is there any way possible of
>> > automating
>> > my
>> > problem.
>> > --
>> > jason36

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?amFzb24zNg==?=
Guest
Posts: n/a
 
      25th Sep 2007
Tim,

Many Thanks

It worked like a dream. I may have another small issue, if so I'll title it
Activating Javascript 2

Thanks again
--
jason36


"Tim Williams" wrote:

> For the button this should work:
> IE.document.getElementById("btnLoad").click
>
> Where IE is your reference to the browser app.
>
>
> For the link this might also work:
> IE.document.getElementById("hlExport").click
>
> ....but it really depends on what happens in the js 'exportExcel()' function.
>
> Tim
>
>
> "jason36" <(E-Mail Removed)> wrote in message
> news:A7DF5E1E-FD24-453A-A587-(E-Mail Removed)...
> > Tim,
> >
> > The button to pull up the list of queries in the web source code is :
> >
> > <input class="button" id="btnLoad" style="WIDTH: 75px"
> > onclick="javascript:loadQuery();"type="button" value="Load">
> >
> > Followed by a link to export to an excel spreadsheet :
> >
> > <br>--><a id="hlExport" href="javascript:exportExcel();">Export to
> > Excel</a><br>
> >
> > The excel spreadsheet created always has the same name so that would be
> > the
> > easy part, it's just the two parts in the automation process above that
> > has
> > got me stumped.
> >
> > Many Thanks
> >
> > --
> > jason36
> >
> >
> > "Tim Williams" wrote:
> >
> >> If you're using the web page directly how do you run the Excel export ?
> >> Button? Link?
> >>
> >> Tim
> >>
> >>
> >> "jason36" <(E-Mail Removed)> wrote in message
> >> news:553B4978-0237-41C1-8FE9-(E-Mail Removed)...
> >> >I have a problem where I want to access a website, run a query on that
> >> > particular page of the website by activating buttons displayed on the
> >> > web
> >> > page and then activate a javascript command to export the data to
> >> > excel.
> >> > I
> >> > am using Excel 2003 Professional. Is there any way possible of
> >> > automating
> >> > my
> >> > problem.
> >> > --
> >> > jason36
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is activating excel? AK_Help Microsoft Outlook VBA Programming 1 13th Nov 2009 12:04 AM
Activating Javascript with excel Part 2 =?Utf-8?B?amFzb24zNg==?= Microsoft Excel Programming 7 1st Oct 2007 11:10 AM
Activating JavaScript from C# Mike Strauss Microsoft ASP .NET 2 20th Dec 2004 02:08 AM
activating excel from VB mahesh Microsoft Excel Programming 1 20th Feb 2004 05:58 PM
Excel formula not activating??? -- Pls. help mohanamr Microsoft Excel Worksheet Functions 0 12th Nov 2003 07:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:43 PM.