📄 asp直接用excel据的例子(不用odbc)http--www_aspsky_net.htm
字号:
width=15><A href="http://www.dvbbs.net/" target=_top><FONT
color=#ccffff>会员中心</A></FONT></FONT></TD></TR></TBODY></TABLE>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR bgColor=#3366ff>
<TD height=2></TD></TR></TBODY></TABLE>
<CENTER></CENTER></TD>
<TD class=p2 width=102></TD></TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR>
<TD height=1></TD></TR>
<TR bgColor=#ffcc00>
<TD align=right height=23 width=355>
<CENTER></CENTER>
<P align=center>中国动感资源交流,网络动感资源荟萃</P></TD>
<TD align=middle>
<P align=center><A href="http://www.moonet.com/edu/">教育网</A>
英文版</P></TD></TR></TBODY></TABLE>
<CENTER>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR vAlign=top>
<TD bgColor=#297dff width=1> </TD>
<TD width=753></TD>
<TD bgColor=#297dff width=1> </TD></TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR vAlign=top>
<TD bgColor=#297dff width=1> </TD>
<TD width=753>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD bgColor=#297dff colSpan=2 height=20><FONT color=#ceffff> →
<A href="http://www.aspsky.net/article/index.asp?classid=2"><FONT
color=#ceffff>ASP技术</FONT></A> >> <A
href="http://www.aspsky.net/article/index.asp?classid=2&Nclassid=10"><FONT
color=#ceffff>数据库相关</FONT></A> >>
《ASP直接调用EXCEL数据的例子(不用ODBC)》</FONT></TD></TR>
<TR>
<TD bgColor=#586011 colSpan=2 height=1><SPACER type="block"
width="1"></TD></TR>
<TR>
<TD colSpan=2 height=7></TD></TR>
<TR>
<TD align=middle class=p4
colSpan=2><B>ASP直接调用EXCEL数据的例子(不用ODBC)</B></FONT><BR>2001-9-4 动网先锋
</TD></TR>
<TR>
<TD class=p4 colSpan=2>
<BLOCKQUOTE><BR>扑咚扑咚 于 8/30/2001 4:52:49 PM 加贴在 Joy ASP ←返回版面:
<BR>例子:<BR>在"c:\excel\book1.xls"存在一个EXCEL表book1.xsl,表的结构如下:<BR>1
序号 名称 金额<BR>2 1 张三 100<BR>3 2 李四 200<BR>4 3 王五 300
<P></P>
<P>序号字段不为空<BR>注意:excel 起始行是1而不是为0 </P>
<P><%@language=vbscript %><BR><%</P>
<P>Set xlApp = server.CreateObject("Excel.Application")</P>
<P>strsource = "c:\excel\book1.xls"</P>
<P>Set xlbook = xlApp.Workbooks.Open(strsource)<BR>Set xlsheet =
xlbook.Worksheets(1)</P>
<P>i=1<BR>response.write "<table cellpadding=0 cellspacing=0
border=1 width=500>"<BR>while
xlsheet.cells(i,1)<>""<BR><BR>response.write
"<tr>"<BR>response.write " <td height=20 align=center
width=100>" & xlsheet.Cells(i, 1) & "</td>"
<BR>response.write " <td height=20 align=center width=200>"
& xlsheet.Cells(i, 2) & "</td>" <BR>response.write "
<td height=20 align=center width=200>" &
xlsheet.Cells(i, 3) & "</td>"<BR>response.write
"</tr>"<BR>i=i+1</P>
<P>wend<BR>response.write "</table>"<BR>set
xlsheet=nothing<BR>set xlbook=nothing<BR>xlApp.quit
'千万记住要加这一句,否则每运行一次你的机器里就增加一个excel进程,而且无法释放。我试过"set
<BR>xlApp=nothing"是不行的。<BR>%><BR><BR><BR></P></BLOCKQUOTE></TD></TR>
<TR>
<TD class=p4 vAlign=top width="50%">
<BLOCKQUOTE>原作者:Timer(转)<BR>来 源:因特耐特<BR>共有5064位读者阅读过此文<BR>【<A
href="http://bbs.aspsky.net/list.asp?boardid=1">发表评论</A>】
</BLOCKQUOTE></TD>
<TD class=p4 vAlign=top width="50%">
<P>
<LI><FONT color=#0772b1>上篇文章</FONT>:<A
href="http://www.aspsky.net/article/list.asp?id=2339">显示左边的n个字符(自动识别汉字)函数(探索者)</A>
<BR>
<LI><FONT color=#0772b1>下篇文章</FONT>:<A
href="http://www.aspsky.net/article/list.asp?id=2341">读取Access数据库表名实例</A>
</LI></TD></TR>
<TR>
<TD bgColor=#297dff class=p4 height=20 width="50%"><FONT
color=#ceffff> → 本周热门</FONT></TD>
<TD bgColor=#297dff class=p4 width="50%"><FONT color=#ceffff> →
相关文章</FONT></TD></TR>
<TR>
<TD bgColor=#586011 colSpan=2 height=1><SPACER type="block"
width="1"></TD></TR>
<TR>
<TD colSpan=2 height=7></TD></TR>
<TR>
<TD class=p4 vAlign=top width="50%">
<LI><A href="http://www.aspsky.net/article/list.asp?id=1510"
target=_top title="SQL Server 7.0 入门(一)">SQL Server 7.0
入门(...</A>[<FONT color=red>7239</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=1540"
target=_top title=PHP4实际应用经验篇(1)>PHP4实际应用经验篇(1)</A>[<FONT
color=red>7135</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=1536"
target=_top
title=无组件文件上传代码实例(支持多文件上传及文件和input域混合上传)>无组件文件上传代码实例(支持多文件上...</A>[<FONT
color=red>6029</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=2557"
target=_top title=树型结构在ASP中的简单解决>树型结构在ASP中的简单解决</A>[<FONT
color=red>5757</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=1545"
target=_top title=PHP4实际应用经验篇(6)>PHP4实际应用经验篇(6)</A>[<FONT
color=red>5599</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=2563"
target=_top title=一个老个写的无组件上传>一个老个写的无组件上传</A>[<FONT
color=red>5014</FONT>]<BR>
<LI><A href="http://www.aspsky.net/article/list.asp?id=1542"
target=_top title=PHP4实际应用经验篇(3)>PHP4实际应用经验篇(3)</A>[<FONT
color=red>4731</FONT>]<BR></LI></TD>
<TD class=p4 vAlign=top width="50%">
<LI><A
href="http://www.aspsky.net/article/list.asp?id=2340">ASP直接调用EXCEL数据的例子(不用ODBC)</A><BR></LI></TD></TR>
<TR>
<TD colSpan=2 height=7></TD></TR></TBODY></TABLE>
<TD bgColor=#297dff width=1> </TD></TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR>
<TD bgColor=#297dff height=1><SPACER type="block"
width="1"></TD></TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR>
<TD align=middle height=30></TD></TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR>
<TD align=middle class=p2 width="100%">
<TABLE border=0 cellPadding=0 cellSpacing=0 width=755>
<TBODY>
<TR>
<TD align=middle class=p2 width="100%">
<P align=center><A
href="http://www.aspsky.net/produce/index.asp">客户服务</A> -- <A
href="http://www.aspsky.net/aspads.asp">广告合作</A> -- <A
href="http://www.aspsky.net/about.asp">关于本站</A> -- <A
href="http://www.aspsky.net/tell.asp">联系方法</A><BR><BR>动网先锋版权所有 <FONT
face=Verdana, size=1 Arial, Helvetica, sans-serif>Copyright ©
2000-2001 <B>AspSky<FONT color=#cc0000>.Net</FONT></B>, All Rights
Reserved .</FONT>
</P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></CENTER></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -