Solved

Open excel,word using Javascript

Posted on 2011-03-22
2
362 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
Suggested Courses

623 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