I have tried this code but it does not work in the chrome
var myApp = new ActiveXObject("Excel.Application");
myApp.workbooks.open("test.xls");
I have tried this code but it does not work in the chrome
var myApp = new ActiveXObject("Excel.Application");
myApp.workbooks.open("test.xls");
ActiveXObjects are only supported by IE. They don't work in Chrome.
ActiveXObject is available only on IE browser. So every other useragent will throw an error
On modern browser you could use instead File API or File writer API (currently implemented only on Chrome)