如何将coldfusion10查询的结果导出到html?用户目前正在与狗一起上传excel表,我需要将pitBullcheck查询的结果输出到html表中,以显示其中有坑表的行。the是excel工作表中的一列。
<cffunction name="validateExcelSheet" access="public" output="yes" returnType="void"
hint="check dogs">
<cfspreadsheet
action="read"
src="#SESSION.theFile#"
headerrow= "1"
excludeHeaderRow = "true"
query = "allData"
rows = "1-#lastRow#" />
<cfscript>
pitBullcheck = new Query(
sql ="SELECT * FROM allData where breed like 'Pit' ",
dbtype = "query",
allData = allData);
pitBullresult = pitBullcheck.execute().getResult();
</cfscript>
</cffunction>
发布于 2014-02-17 02:34:10
<table>
<tr>
<td>breed</td>
</tr>
<cfoutput query="pitBullresult">
<tr>
<td>#pitBullresult.breed#</td>
</tr>
</cfoutput>
</table>
然后,只需为查询中的每个列添加额外的<td>
即可。
https://stackoverflow.com/questions/21819487
复制相似问题