Solved

Launch XLS file using javascript>

Posted on 2009-07-02
2
366 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
This video teaches users how to migrate an existing Wordpress website to a new domain.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now