无效@Command原语 ,指定的 'page contentType="application/vnd.ms-excel;charset=GB2312"' 选项未知或无效。 代码如下
<%@ page contentType= "application/vnd.ms-excel;charset=GB2312 "%>
<%
sfilename = Formatdatetime(Now, 1)
sfilename = Server.Mappath( "csv ") & "\ " & cstr(sfilename) & ".xls "
set Myobj=server.CreateObject( "projectexcel.classexcel ")
Myobj.stroutpath=sfilename
Myobj.aspexcel( "select I_OBJECT from T_STOCK_TRACE_TR order by I_UPDATE_DATE desc ")
set Myobj=nothing
%>
<html>
<script>
window.location= " <%=sfilename%> ";
</script>
------解决方案--------------------asp中没有这种@命令
设置字符用CODEPAGE=
设置语言用LANGUAGE
例如:
<%@LANGUAGE= "VBSCRIPT " CODEPAGE= "936 "%>
设置ContentType用
Response.ContentType
例如:
Response.ContentType= "application/vnd.ms-excel "
狗年年底,冲星接分~~~~~~~~~~