how do I display excel files stored as binary
I am trying to create a page that gives users the option to view or download excel files stored in SQL Server database as varbinary(max)
I have googled and searched and figured out how output images that are stored as binary. I have not been successful yet with excel spreadhseets and I want to be able to do pdf. and word also. Our DBA will not change the datatype. Any help would be awesome.
Thank you - Jim
Code So far:
<cfquery name="getBinaryXLS" datasource="rapImageTest">
select scopechange_data, contentType, contractID
from Contract_ScopeChanges
where ContractScopeChangeID in (11,12)
</cfquery>
<cfset i = 0>
<table>
<cfoutput query="getBinaryXLS">
<tr>
<td>#scopechange_data#</td>
<td><cfset i = i+1>
<cfcontent source="#getBinaryXLS.scopechange_data#" destination="sheet#i#.xls"
action="write" overwrite="yes"></td></tr></cfoutput>
</cfoutput></table>