本文介绍了使用XML格式导出Excel模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<cfxml variable="xmlDataDump">
<?mso-application progid="Excel.Sheet"??>
<workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet">
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<Styles>
<Style ss:ID="s25">
<alignment ss:horizontal="Center" ss:vertical="Bottom" xmlns:ss="#unknown" />
<borders>
<border ss:removed="Bottom" ss:linestyle="Continuous" ss:weight="1" xmlns:ss="#unknown" />
</borders>
<font x:family="Swiss" ss:bold="1" xmlns:ss="#unknown" xmlns:x="#unknown" />
</Style>
<Style ss:ID="s27">
<alignment ss:horizontal="Center" ss:vertical="Bottom" xmlns:ss="#unknown" />
<borders>
<border ss:removed="Bottom" ss:linestyle="Continuous" ss:weight="1" xmlns:ss="#unknown" />
</borders>
<font x:family="Swiss" ss:bold="1" xmlns:ss="#unknown" xmlns:x="#unknown" />
<interior ss:color="#99CCFF" ss:pattern="Solid" xmlns:ss="#unknown" />
</Style>
<Style ss:ID="s28">
<interior ss:color="#99CCFF" ss:pattern="Solid" xmlns:ss="#unknown" />
</Style>
</Styles>
<worksheet ss:name="Sheet1" xmlns:ss="#unknown">
<table ss:expandedcolumncount="6" ss:expandedrowcount="12" x:fullcolumns="1" x:fullrows="1" xmlns:x="#unknown">
<column ss:width="93" />
<row>
<cell ss:styleid="s25"><data ss:type="String">Salesperson</data></cell>
<cell ss:styleid="s25"><data ss:type="String">1Qtr</data></cell>
<cell ss:styleid="s25"><data ss:type="String">2Qtr</data></cell>
<cell ss:styleid="s25"><data ss:type="String">3Qtr</data></cell>
<cell ss:styleid="s25"><data ss:type="String">4Qtr</data></cell>
<cell ss:styleid="s27"><data ss:type="String">Year</data></cell>
</row>
<cfoutput>
<cfloop query="qrySales">
<row>
<cell><data ss:type="String">#qrySales.SALESPERSON#</data></cell>
<cell><data ss:type="Number">#qrySales.QTR1#</data></cell>
<cell><data ss:type="Number">#qrySales.QTR2#</data></cell>
<cell><data ss:type="Number">#qrySales.QTR3#</data></cell>
<cell><data ss:type="Number">#qrySales.QTR4#</data></cell>
<cell ss:styleid="s28" ss:formula="=SUM(RC[-4]:RC[-1])"></cell>
</row>
</cfloop>
</cfoutput>
</table>
</worksheet>
</workbook>
</cfxml>
了解更多:http://tutorial429.easycfm.com/#ixzz1mGcHxqYX
Read more: http://tutorial429.easycfm.com/#ixzz1mGcHxqYX
推荐答案
这篇关于使用XML格式导出Excel模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!