<script language="javascript">
function xlprint(){
var xlapp;
var xlbook;
var xlsheet;
set xlbook=xlapp.workbooks.open("print")
set xlbook=xlapp.workbooks.add()
set xlsheet=xlbook.worksheets("tijianjulu")
set xlsheet=xlbook.activesheet
try{
xlapp=new activexobject("excel.application");
catch(e)
alert("请启用ActiveX控件设置!");
return;}
xlbook=xlapp.workbooks.add();
xlsheet=xlbook.activesheet;
var rowlen=printdata.rows.length;
for (var i=0;i<rowlen;i++){
var collen=printdata.rows(i).cells.length;
for (var j=0;j<collen;j++)
xlsheet.cells(i+1,j+1).value=printdata.rows(i).cells(j).innertext;}
xlapp.visible=true;
xlsheet.printout
xlbook.close
xlapp.quit
set xlapp=nothing
</script>
</body>
</html>
以上是print.asp代码,显示为空白页面