<%dim excelstring
dim excelstr
dim excelstr2
dim head
excelstring = ""
head = "Sn" & "," & "Reason" & "," & "Empid" & "," & "Empname" & "," & "Ext" & "," & "Depname"
excel="creat"
If excel<>"" Then
Set rs2 = Server.CreateObject ("ADODB.Recordset")
sql2 = "Select * from value_table "
rs2.open sql2,conn,1,3
do while not rs2.eof
excelstr =" " & rs2(0) & """,""" & rs2(1) & """,""" & rs2(2) & """,""" & rs2(3) & """,""" & rs2(4) & """,""" & rs2(5) & """"
excelstr2 = excelstr2 & Chr(13) & excelstr
rs2.movenext
伊图教程网[www.etoow.com]
http://www.etoow.com/html/2008-02/1203140138.html
loop
ASP生成Excel表格
'http://www.etoow.com/html/2008-02/1203140138.html