macromedia.coldfusion.flash_integration
[Top] [All Lists]

Re: using getURL with cfcontent and Excel files

Subject: Re: using getURL with cfcontent and Excel files
From: "BKBK" <webforumsuser@xxxxxxxxxxxxxx>
Date: Sat, 7 Jul 2007 18:48:41 +0000 (UTC)
Newsgroups: macromedia.coldfusion.flash_integration

Two quick points. "XLS" is same as "xls" in Coldfusion, so no need to compare 
for both. Use absolute path for the file attribute in cfcontent. Something like 
this should work 

 <cfselect 
                size = "15" 
                required = "Yes"
                query = "getData" 
                
onchange="getURL('somePage.cfm?requestedFile=viewFile.xls','_blank')"
                value ="id" 
                display ="name"                 
                              <option value = "">Select All</option>
        </cfselect>


 somePage.cfm
 ===============
 <cfif Right(url.requestedFile,3) IS "xls">
 <cfheader name="Content-Disposition" value="inline; filename=Report.xls">
 <cfcontent type="application/vnd.ms-excel" 
file="c:/coldfusion8/wwwroot/testfile.xls">
 </cfif>






<Prev in Thread] Current Thread [Next in Thread>