Search code examples
javajavascriptxcodeexcelactivexobject

How to open excel file using JavaScript code without using ActiveX control?


How to open an Excel document using JavaScript code and without using an ActiveX control object like:

var myApp = new ActiveXObject("Excel.Application");
myApp.workbooks.open("test.xls");

Solution

  • It's possible to open .xlsx files with Javascript because they are ZIP packages. This has been experimented with XForms: http://www.w3.org/community/xformsusers/2012/12/19/editing-zip-with-xforms/