Solved

Launch XLS file using javascript>

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to print dynamic Google map and directions? 1 23
Hide Table in merge 3 31
How to resize a div in html 3 37
How do I show metrics with PHP or Javascript 6 32
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…
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

856 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