<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>导出Excel</TITLE> <script type="text/javascript"> var idTmr = ""; function killExcelProcess(appExcel_){ appExcel_.Quit(); appExcel_ = null; idTmr = window.setInterval("Cleanup();",1); }
//导出到excel,参数tableid为JSP页面需要导出的table的id,需要更改IE的安全设置,ActiveX都打开,如果还是不能使用,再服务端运行“regsvr32 scrrun.dll” function exportToExcel(tableid,notitleandsearch){ try { clipboardData.setData('Text',''); var appExcel = new ActiveXObject("Excel.Application");