Open excel,word using Javascript


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;

                objExcel.Workbooks.Open(strLocation, false, false);
                objExcel.UserControl = true

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

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.