Excellent! Just what I needed than you very much Paul!!! Now you've gone
a done it though :), I've been contemplating converting this
questionnaire I built from its current form to Flex just to get my feet
wet with Flex.


Bob
-----Original Message-----
From: Paul Kukiel [mailto:[email protected]] 
Sent: Thursday, January 08, 2009 9:20 AM
To: cf-newbie
Subject: RE: How would I write and save xls files?

Using cffile to write out the information table you built up.:

Ie build up the table with <cfsavecontent /> or build up a tab delimited
string.  Then use

<cffile action="write" file="#expandpath('.')#\file.xls"
output="#someExcelContent#" />

I recently did this with Flex as the front end and can be seen here:

http://blog.kukiel.net/2009/01/flex-datagrids-and-excel-part-2.html

By simply changing the server side .cfm file to:

<cffile action="write" file="#expandpath('.')#\file.xls"
output="#form.htmltable#" />

I can write files out that excel will read.  In this example I have used
TAB
delimited strings but HTML output works the same way.

Paul.


-----Original Message-----
From: Imperial, Robert [mailto:[email protected]] 
Sent: Thursday, 8 January 2009 8:42 AM
To: cf-newbie
Subject: RE: How would I write and save xls files?

Sorry for the typo, no coffee yet this morning :) 

What I meant to type was, I've been creating an excel file using the
following:

Off to the coffee pot:


-----Original Message-----
From: Imperial, Robert [mailto:[email protected]] 
Sent: Thursday, January 08, 2009 8:39 AM
To: cf-newbie
Subject: How would I write and save xls files?

Hi folks,

 

I've been creating an files using the following:

<cfheader name="Content-Disposition"
value="filename=Current_#ThisFile#.xls" />

<cfcontent type="application/msexcel" />

 Outputting the contents of this file in a table for downloading. This
works fine and now I need to write or save this file to the server so I
can send it as an email attachment. Does anybody out there know of
simple tutorial or walkthrough on how to accomplish this? 

 

I am on IIS6 + CF 7,0,2,142559

 

TIA

 

Bob

 









~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4274
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to