日期:2014-05-17  浏览次数:20914 次

请大家帮我看一下. 关于access导出exceL的问题..
它提示第52行出错...不清楚是什么问题..
错误类型:
Microsoft   VBScript   运行时错误   (0x800A004C)
路径未找到
/page/getexcel.asp,   第   52   行


<!--   #include   file= "conn.inc "-->
<%
way=request.QueryString( "way ")
%>

<html   xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 "   />
<title> 无标题文档 </title>
<link   href= "style.css "   rel= "stylesheet "   type= "text/css "   />
</head>
<body>
<table   cellpadding= "0 "   cellspacing= "0 "   border= "0 "   width= "100% ">
<tr   align= "center "   class= "font ">
<td   align= "center "   width= "10% "> <a   href= "clientM.asp "> 客户管理 </a> </td>
<td   align= "center "   width= "10% "> 打印资料 </td>
<td   align= "center "   width= "10% "> <b> 导入Excel </b> </td>
<td   width= "70% "> </td>
</tr>
<tr>
<td   colspan= "4 "   align= "center "> <img   src= "../pic/dt1.gif "   width= "100% "   height= "1 "> </td>
</tr>
<tr>
<td   colspan= "4 ">
<br>
<br>
<br>
<br>
<form   name= "Excel "   method= "post "   action= "getexcel.asp?way=2 ">
<table   cellpadding= "0 "   cellspacing= "0 "   border= "0 "   width= "100% ">
<tr   align= "center ">
<td   align= "center "> 请输入文件名: <input   type= "text "   name= "filename "   value= " "> </td>
</tr>
<tr   align= "center ">
<td   align= "center "> <input   type= "submit "   name= "submit "   value= "确定 " > </td>

</tr>
</table>
</form>
<%if   way=2   then
  response.Write( "正在导入,请稍候! ")  
dim   s,sql,filename,fs,myfile,x,stradd  
filename   =   request.Form( "filename ")  
Set   fs   =   server.CreateObject( "scripting.filesystemobject ")    
'--假设你想让生成的EXCEL文件做如下的存放    
stradd   =   "../excel/ "&filename& ".xls "  
'--如果原来的EXCEL文件存在的话删除它    
if   fs.FileExists(stradd)   then    
        fs.DeleteFile(stradd)    
end     if    
'--创建EXCEL文件    
set   myfile   =   fs.CreateTextFile(stradd,true)    
 
'--从数据库中把你想放到EXCEL中的数据查出来    
sql   =   "select   *   from   client "    
rs.Open