Well you are not saving an XLS file - it's just HTML, but you should be able
to the same thing just with , in the right places and using line breaks
chr(12) and (13) I think. I can't remember been such a long time since I had
to do this!





"This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-----Original Message-----
From: John Lucania <[EMAIL PROTECTED]>
To: CF-Talk <cf-talk@houseoffusion.com>
Sent: Thu Jul 27 03:23:51 2006
Subject: converting xls to csv

I have codes for saving in XLS, but need to change it in CSV format.
What do you need to change?

<cfsavecontent variable="results">
          <cfcontent type="application/vnd.ms-excel">
            <table>
            <tr>
              <th>employee</th>
              <th>firstname</th>
              <th>middlename</th>
              <th>lastname</th>
              <th>addr1</th>
              <th>addr2</th>
              <th>city</th>
              <th>state</th>
              <th>zip</th>
              <th>hmphonenbr</th>
              <th>datehired</th>
              <th>termdate</th>
              <th>department</th>
              <th>departmen2</th>
              <th>jobcode</th>
              <th>jobdescrip</th>
              <th>empstatus</th>
              <th>emergconta</th>
              <th>emergphone</th>
            </tr>
            <cfoutput query="GetTP2000">
                   <tr>
                   <td>#employee#</td>
                   <td>#firstname#</td>
                   <td>#middlename#</td>
                   <td>#lastname#</td>
                   <td>#addr1#</td>
                   <td>#addr2#</td>
                   <td>#city#</td>
                   <td>#state#</td>
                   <td>#zip#</td>
                   <td>#hmphonenbr#</td>
                   <td>#datehired#</td>
                   <td>#termdate#</td>
                   <td>#department#</td>
                   <td>#departmen2#</td>
                   <td>#jobcode#</td>
                   <td>#jobdescrip#</td>
                   <td>#empstatus#</td>
                   <td>#emergconta#</td>
                   <td>#emergphone#</td>
                   </tr>
                 </cfoutput>
            </table>
</cfsavecontent>
     </body>
</html>

<Cffile action="write" file="D:\ bla.....Get.xls" output="#results#">

I need to keep the column headers above.

tia



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:247844
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to