主题:生成excel文件格式出错!急!急!急!求解.
我用下面的语句从数据库生成一个表格,用Response.ContentType="application/vnd.ms-excel"
变成excel让客户端下载,
但我发现不加
Response.ContentType="application/vnd.ms-excel"
语句的时候
bjbh=Request.form("select2")
能得到连接页面传送的"select2"能生成正常的网页格式的数据表格
但加上
Response.ContentType="application/vnd.ms-excel"
后
bjbh=Request.form("select2")
得到的班级代号就是空了,怎么办呢?
下面是我的程序
Response.ContentType="application/vnd.ms-excel"
bjbh=Request.form("select2")
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from aryjbxx where bjbh='"&bjbh&"'",conn,1,1
变成excel让客户端下载,
但我发现不加
Response.ContentType="application/vnd.ms-excel"
语句的时候
bjbh=Request.form("select2")
能得到连接页面传送的"select2"能生成正常的网页格式的数据表格
但加上
Response.ContentType="application/vnd.ms-excel"
后
bjbh=Request.form("select2")
得到的班级代号就是空了,怎么办呢?
下面是我的程序
Response.ContentType="application/vnd.ms-excel"
bjbh=Request.form("select2")
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from aryjbxx where bjbh='"&bjbh&"'",conn,1,1