关于数据导入导出问题

guyong009 2003-10-18 11:21:18
请问能不能用ASP实现数据导入导出功能:把符合查询条件的Oracle数据导到Excel中?如能的话该怎么做?
...全文
40 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
guyong009 2003-10-18
  • 打赏
  • 举报
回复
哦,谢谢,我先试试先。希望各位高手能多提供些方法。
lqflsh 2003-10-18
  • 打赏
  • 举报
回复

这是我写的一种方法,你可以参考,导入到数据库你自己写吧~

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>New Page 2</title>
</head>

<body style="text-align: center">
<%
for t=1 to 10
ad=ad+" "+Request.Form("c"&t)
next
response.write ad
%>
<form name="kao" action="" method="post">
<object classid="clsid:0002E510-0000-0000-C000-000000000046" id="Spreadsheet1" codebase="msowc.cab" width="716" height="330">
<param name="HTMLURL" value>
<param name="HTMLData" value="<html xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<style type="text/css">
<!--tr
{mso-height-source:auto;}
td
{white-space:nowrap;}
.wc4590B94
{white-space:nowrap;
font-family:宋体;
mso-number-format:General;
font-size:auto;
font-weight:auto;
font-style:auto;
text-decoration:auto;
mso-background-source:auto;
mso-pattern:auto;
mso-color-source:auto;
text-align:general;
vertical-align:bottom;
border-top:none;
border-left:none;
border-right:none;
border-bottom:none;
mso-protection:locked;}
-->
</style>
</head>

<body>
<!--[if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:OWCVersion>9.0.0.2710</x:OWCVersion>
<x:Label Style='border-top:solid .5pt silver;border-left:solid .5pt silver;
border-right:solid .5pt silver;border-bottom:solid .5pt silver'>
<x:Caption>Microsoft Office Spreadsheet</x:Caption>
</x:Label>
<x:Name>Sheet1</x:Name>
<x:WorksheetOptions>
<x:Selected/>
<x:Height>8731</x:Height>
<x:Width>18944</x:Width>
<x:TopRowVisible>0</x:TopRowVisible>
<x:LeftColumnVisible>0</x:LeftColumnVisible>
<x:ProtectContents>False</x:ProtectContents>
<x:DefaultRowHeight>210</x:DefaultRowHeight>
<x:StandardWidth>3754</x:StandardWidth>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
<x:MaxHeight>80%</x:MaxHeight>
<x:MaxWidth>80%</x:MaxWidth>
</x:ExcelWorkbook>
</xml><![endif]-->

<table class=wc4590B94 x:str>
<col width="88" style='mso-width-source:userset'>
<tr height="14">
<td></td>
</tr>
</table>

</body>

</html>
">
<param name="DataType" value="HTMLDATA">
<param name="AutoFit" value="0">
<param name="DisplayColHeaders" value="-1">
<param name="DisplayGridlines" value="-1">
<param name="DisplayHorizontalScrollBar" value="-1">
<param name="DisplayRowHeaders" value="-1">
<param name="DisplayTitleBar" value="-1">
<param name="DisplayToolbar" value="-1">
<param name="DisplayVerticalScrollBar" value="-1">
<param name="EnableAutoCalculate" value="-1">
<param name="EnableEvents" value="-1">
<param name="MoveAfterReturn" value="-1">
<param name="MoveAfterReturnDirection" value="0">
<param name="RightToLeft" value="0">
<param name="ViewableRange" value="1:100">
</object>
<script language="vbscript">
<%for i=1 to 10%>
kao.Spreadsheet1.cells(<%=i%>,1)="<%=i%>NIRVANA"
<%next%>

function view()
<%for j=1 to 10%>
kao.c<%=j%>.value=kao.Spreadsheet1.cells(<%=j%>,1)
<%next%>
end function
</script>
<br/>
<input type="submit" value="保存" onclick="view()">
<%for g=1 to 10%>
<input type=hidden name="c<%=g%>" value="">
<%next%>
</form>

</body>

</html>


28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧