从SQL中的一个表中导出HTML文件表格
发表于:2007-07-02来源:作者:点击数:
标签:
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_temporaryda
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>
原文转自:http://www.ltesting.net