Solved

Open excel,word using Javascript

Posted on 2011-03-22
2
357 Views
Last Modified: 2012-05-11
Hi

I want to open excel,word files which located at my web server from web browser.

I used following code

 <script type="text/javascript">
        function openExcel(strFilePath) {

            openExcelDocPath(strFilePath, false);
        }
        function openExcelDocPath(strLocation, boolReadOnly) {
            var objExcel;
            objExcel = new ActiveXObject("Excel.Application");
            if (objExcel != null) {
                objExcel.Visible = true;
                alert(strLocation);

                objExcel.Workbooks.Open(strLocation, false, false);
                objExcel.UserControl = true
            }
        }
    </script>

which is working but it open in read only mode . i want it in read and write mode.

and above code work for on IE its not work for other browser.

please guide me to solve issue.
0
Comment
Question by:jbajaj
2 Comments
 
LVL 7

Accepted Solution

by:
nbove earned 500 total points
ID: 35191122
Try changing:
objExcel.Workbooks.Open(strLocation, false, false);
to
objExcel.Workbooks.Open(strLocation);
0
 

Author Comment

by:jbajaj
ID: 35196246
No nvobe its still opening in read only mode
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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
What does GoogleTagMgr javascripts below do 5 35
jQuery Toggle & Anchor Links 5 43
Html Newline 7 21
Wordpress Query 5 27
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
This article discusses how to create an extensible mechanism for linked drop downs.
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)
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…

830 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