0

Need to add support for edge browser.

var Excel, Book;
Excel = new ActiveXObject("Excel.Application");
Excel.Visible = true;

Using above code i am opening excel. Activex object is not supported by Edge now.
Is there any alternative for functionality to work on Edge also?

S2K
  • 1,185
  • 3
  • 27
  • 55

1 Answers1

1

To open Excel (UWP-version, or desktop if user changed association) you can use the ms-excel protocol. Here is description of the URI-protocol for iOS. I believe it should work on Windows 10 as well.

Update: To use this protocol - just open a link with URL like this one:

ms-excel:ofe|u|https://contoso/Q4/budget.xslx|p|clouddrive|c|folderviewQ4

Edit options per description at the link above.

Here is how to open a link in jQuery: How can I open a link in a new window?

Community
  • 1
  • 1
Konstantin
  • 884
  • 6
  • 12
  • i need to open excel file from Jquery. How to use ms-excel protocol in jquery? – S2K May 04 '16 at 07:12
  • how would i call the method in excel add-in? – S2K May 04 '16 at 10:27
  • Can you explain your context? What do you mean by excel add-in and how it is related to opening excel file from Edge? – Konstantin May 04 '16 at 11:05
  • I have one web application which has some filters and on some action application opens the excel and the filters in web application are passed to excel and excel has slicers, to this slicers the filters are assigned. This assignment of filter to excel is done in another project (Add-in project ) which uses Microsoft.Office.Interop.Excel. So jquery gives call to the method in this add in using activex object which is not supported by edge. – S2K May 04 '16 at 11:27
  • Oh, I think it is not possible to directly communicate with Excel from Edge context. You can potentially do it thru a web-service: JavaScript code in your web application (Edge context) should call some web-service (backend) that will communicate with your add-in inside Excel (Excel context) and vice-versa. – Konstantin May 04 '16 at 13:15