you can create an excel spreadsheet out of a regular-ol HTML <table> -
if you wanted to make the spreadsheet database driven you could use
<cfheader> & <cfcontent> - to generate an excel spreadsheet on the fly,
which would always be current:

<!---dump to excel---->
<cfset filename = ListLast(Trim(CGI.PATH_INFO),"/")>
<cfset path="">
<cfheader name="Content-Disposition"
                        value="attachment; filename=excel-report.xls">  
<cfcontent type="application/excel" >  
<cfif query.recordCount>
        <div align="center">
        <table width="500" border="0" cellpadding="1" >
        <tr>
                <th>field 1</th>
                <th>field 2</th>
                <th>field 3</th>
        </tr>
        <cfoutput query="query">
        <tr>
                <td>#field1#</td>
                <td>#field2#</td>
                <td>#field3#</td>
        </tr>
        </cfoutput>
        </table>
        </div>
<cfelse>
        No records returned
</cfif>

-----Original Message-----
From: Steve Oliver [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 1:17 PM
To: CF-Talk
Subject: RE: Forcing Excel Download


You could put your excel files in a separate folder, then (presuming
your using IIS) you can set the content expiration for that folder to
immediately.

As far as forcing them to save, I don't think there's a way to do that,
they'll always have the option to open from current location.

_____________________________
steve oliver
senior internet developer
atnet solutions, inc.
http://www.atnetsolutions.com


-----Original Message-----
From: Attley, Simon (CMG-SF) [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 12, 2002 12:58 PM
To: CF-Talk
Subject: Forcing Excel Download


Hello list,
I currently have an absolute link to an Excel file on our server.
Clicking
the link opens a new window and the excel spreadsheet populates the new
window.  The problem is that when I replace the excel file on the server
with a newer version, clicking on the absolute link still brings up the
old
file.

How do I ensure that when a user clicks the link they will get the
newest
version of the file and can I force them to first save the file to their
local machine before opening it, as it is know it always just opens in
the
browser.

Thanks very much,

Simon 


______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to