从SQL中的一个表中导出HTML文件表格
2024-07-21 02:08:40
供稿:网友
execute sp_makewebtask @outputfile = 'd:/alcatel/20030902/check.htm',
@query = 'select * from eiems_temporarydata..property', @templatefile = 'd:/alcatel/20030902/check.tpl',------check.tpl文件为模板文件
@dbname = 'eiems_temporarydata', @rowcnt = 0, @whentype = 9 ,@lastupdated = 1
go
******************************check.tpl*******************************
<html>
<head>
<title>pelease check it when you finish!</title>
<style type="text/css">
body{font-size:9pt}
th{font-size: 12pt}
td{ font-size: 12pt }
-->
</style>
<body text="#ffffff" bgcolor="#fff5ee">
<center>
<h1><font color="000000">check it!</font></h1>
<hr>
<p>
<h2>
<table border="1" cellpadding="0" cellspacing="0"bgcolor="#436eee">
<tr> <th><b>size</b></th>
<th><b>date</b></th>
<th><b>name</b></th>
<th><b>exist</b></th>
<th><b>remark</b></th>
<th><b>result</b></th>
</tr>
<%begindetail%>
<tr> <td> <%insert_data_here%> </td>
<td align=right><%insert_data_here%></td>
<td align=right><%insert_data_here%></td>
<td align=right><%insert_data_here%></td>
<td align=right><%insert_data_here%></td>
<td align=right><%insert_data_here%></td>
</tr>
<%enddetail%>
</table>
</center>
</h2>
</body>
</html>