Solved

Launch XLS file using javascript>

Posted on 2009-07-02
2
368 Views
Last Modified: 2012-06-27
I have a google maps page I am playing with.  I'd like to add a button to the form to launch an XLS file sitting in a remote location.  Is this possible?

I have tried the following without success:

      <script language="JavaScript">
            function startExcel(strFile)  {
                  alert ("startExcel");
                  var myApp = new ActiveXObject("Excel.Application");
                  if (myApp != null) {
                        myApp.Visible = true;
                        myApp.Workbooks.Open(strFile);
                         }
               }
      </script>

Called by:

        <a href="javascript:startExcel('http://myserver.com/test.xls')">Test.xls</a>

Any suggestions to accomplish this task?
0
Comment
Question by:markp99
2 Comments
 
LVL 12

Accepted Solution

by:
kevin_u earned 500 total points
ID: 24768008
Browser security should prevent using ActiveXObject("Excel.Application") from any web site.

You could try:

<a href="javascript:window.open('http://myserver.com/test.xls','_blank')">Test.xls</a>

But I don't know if that gives you the functionality you need.

0
 

Author Closing Comment

by:markp99
ID: 31599370
?
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question