1 Reply Latest reply on Nov 1, 2010 11:16 AM by Tpaul

    Issues with CFOBJECT (com), downloading data from SQL to Excel.




      I am trying to download the data from SQL 2005 to 2000 excel and it is giving me following errors. (code is added below)


      Please note that I have both Excel 2000 and Excel 2007 installed on my machine. (using Cold Fusion 7.0)

      Is there anything I am doing wrong in the code.? Any quick help to resolve this issue would be really appreciated.

      1) An exception occurred when executing a Com method. 

      The cause of this exception was that: AutomationException: 0x800706ba -

      2) An exception occurred when accessing a Com object field at line #17 (Code is : objWorkbooks = objExcel.Workbooks;)

      3) An exception occurred when executing a Com method at line #17 (Code is : <cfset objExcel.Quit()>)

      4) [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Excel Driver] Could not find installable ISAM.


      I have coldfusion-70-updater2-win.exe as the latest update. Do I need to install updater 3 for the above error and where can i get the updater3.

      ------------------------------------------------------------------------------------------ ----------------------------------------------------------------------------

      ------------------------------------------------------------------------------------------ --------------------------------------------------------------------------------

      <cfobject action="CONNECT" class="Excel.Application" name="objExcel" type="COM">                        
      <CFSET DEBUG_STEP_STR = "1">               
                     <cfobject action="CREATE" class="Excel.Application" name="objExcel" type="COM">
                     <CFSET DEBUG_STEP_STR = "1">
                     <cfcatch type="Any">
                            <cfabort showerror="Error Message">                    
           objWorkbooks = objExcel.Workbooks;
           objWorkbook = objWorkbooks.Open(#FILE_TEMPLATE#);
           DEBUG_STEP_STR = "2";
           objWorksheet = objWorksheets.Item("test1");
           objWorksheet = objWorksheets.Item("test2");                                                  
      <cfset objWorksheet.SaveAs("#FILE_SAVEASPATH#", Val(1))>
      <cfset objWorkbook.Close()>
      <cfset objWorkbook     = "Nothing">
      <cfset objExcel.Quit()>               
      <cfset objExcel = "Nothing">