Are you wanting to avoid the file attribute?

This is Ben's solution but it requires a template file and a write file:



<poi:document
        name="REQUEST.ExcelData"
        file="#ExpandPath( './test.xls' )#"
    template="#ExpandPath( './includes/poitemplate.xls' )#"
        >
</poi:document>



<!--- Tell the browser to expect an Excel file attachment. --->
<cfheader
        name="content-disposition"
        value="attachment; filename=test.xls"
        />
 
<!---
        Tell browser the length of the byte array output stream.
        This will help the browser provide download duration to
        the user.
--->
<cfheader
        name="content-length"
        value="#REQUEST.ExcelData.Size()#"
        />
 
<!--- Stream the binary data to the user. --->
<cfcontent
        type="application/excel"
        variable="#REQUEST.ExcelData.ToByteArray()#"
        /> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330232
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to