Possible Duplicate:
In need of JavaScript Solution for Exporting table to Excel which works in all browsers
My Requirement is that I want the Table to be exported to Excel by clicking on Button “Export”.In my code I have one issue in Exporting HTML table (in JSP Page) to Excel . As of now , it is exporting from Internet explorer but not from mozillaFireFox. I want to Export it from all Browsers (by clicking on the button) like mozilla firefox, Internet explorer. Can any one help me in this? My java Script as follows.
function Export_to_Excel()
{
alert (" Welcome ! Have a Nice Day");
var x=excel.rows;
var objExcel = new ActiveXObject("Excel.Application");
objExcel.Visible = true;
var objWorkbook = objExcel.Workbooks.Add;
for(i=0;i<x.length;i++)
{
var y=x[i].cells;
for(j=0;j<y.length;j++)
{
objWorkbook.ActiveSheet.Cells(i+1, j+1).value=y[j].innerText;
}
}
}
As stated on http://support.mozilla.org/en-US/kb/ActiveX, Firefox does not support ActiveX.