Solved

Launch XLS file using javascript>

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

679 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