Have you tried using QueryNew, QuerySetCell and QueryAddRow in conjunction
with CFX_Excel?  I use it here with tremendous success on some very heavily
used applications.  You need to have Excel on the server to use this, but it
work great!  I creates the Excel file on the server, then using CFCONTENT
you can download the file and delete it off the server to keep things tidy!

Dave


=================================
"What we need is a list of specific unknown problems we will encounter"

David Hannum
Web Analyst/Programmer
Ohio University
[EMAIL PROTECTED]
(740) 597-2524



----- Original Message -----
From: "seth ward" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, October 18, 2000 6:59 AM
Subject: Creating Excel Documents


I am desperately trying to output the contents of a query into a new
Excel document; I have just about managed to open Excel on the client's
machine using cfobject and some cfscript but it seems that i just get
errors when trying to follow the Microsoft Visual Basic instructions in
Excel.

I can't seem to actually enter any data, save the worksheet or
anything...

The code I can use successfully is below. The problem I get is if I then
try to use
    newDoc.Range("A1").Value = 1;

to set the first cell in the worksheet to have a value of 1.

I get an invalid parser error, even though it is the exact syntax copied
from the example given on the range property.

HELP, Please! Is there an easier way???

----------------
code begins
---------------


<CFTRY>

  <CFOBJECT
        ACTION="CONNECT"
        CLASS="Excel.Application"
        NAME="objExcel"
        TYPE="COM">
  <CFCATCH>

    <CFOBJECT
        ACTION="CREATE"
        CLASS="Excel.Application"
        NAME="objExcel"
        TYPE="COM">
  </CFCATCH>
</CFTRY>


<CFSCRIPT>
    /* This will open Excel if running locally */
    objExcel.Visible = true;

    /* This returns the 'Documents' collection the Excel Object */
    objBook = objExcel.Workbooks;

    /* Create a new document */
    newDoc = objBook.add();


</CFSCRIPT>


--------------
code ends
--------------

seth ward

________________________________________________________________________
This message has been checked for all known viruses, by Star Internet,
delivered through the MessageLabs Virus Control Centre.
For further information visit:
http://www.star.net.uk/stats.asp

----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=sts or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to