帮帮忙,看看这段生成EXCEL文件的代码
<%
on error resume next
set objExcelApp = CreateObject("Excel.Application")
objExcelApp.DisplayAlerts = false
objExcelApp.Application.Visible = false
objExcelApp.WorkBooks.Open("d:\aaa\excel\Stencil.xls")
Set objExcelBook = objExcelApp.ActiveWorkBook
set objExcelSheets = objExcelBook.Worksheets
Set objExcelSheet = objExcelBook.Sheets(1)
objExcelSheet.Cells(5,1).Value = "StationName"
objExcelSheet.Cells(5,2).Value = "i"
objExcelSheet.Cells(5,3).Value = "YearPlan"
objExcelSheet.Cells(5,4).Value = "MonthIncome"
objExcelSheet.Cells(5,6).Value = "MonthIncome"
objExcelSheet.Cells(5,7).Value = "YearIncome"
objExcelSheet.Cells(5,9).Value = "YearIncome"
objExcelBook.SaveAs "d:\aaa\excel\admin.xls"
objExcelApp.Quit
Set objExcelApp = Nothing
response.redirect "../excel/admin.xls"
%>
把这段代码拷贝成一个ASP文件,系统执行这段代码的时候,很长时间没有反映,
在WIN2000的任务管理器中可以看到有一个EXCEL的进程存在,该进程用任务管理器
不能关闭。
有人遇到这种情况吗?
为什么?
应该怎么办?