Open excel,word using Javascript

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.
jbajajAsked:
Who is Participating?
 
Nathan BoveConnect With a Mentor Software EngineerCommented:
Try changing:
objExcel.Workbooks.Open(strLocation, false, false);
to
objExcel.Workbooks.Open(strLocation);
0
 
jbajajAuthor Commented:
No nvobe its still opening in read only mode
0
All Courses

From novice to tech pro — start learning today.