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?sidebarRsts or send a message with 
'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to