title: Borland Delphi 7 TExcelApplication.Connect works on office machines but not at client
body: <p>I'm in charge of maintaining some legacy code at my office (Pascal) due to it's limitations, I've written a delphi dll to access excel using TExcelApplication.</p>
  
  <p>The dll works perfectly at the office, the machines are running Microsoft Office 2010, Windows 7 32-Bit and 64-Bit. The client is using Novel Workstations, Windows XP, Microsoft 2007.</p>
  
  <p>The dll gives a breakpoint exception when encountering the TExcelApplication.Connect; command.</p>
  
  <p>Other than the differences that I've mentioned, the scenario's are exactly the same.</p>
  
  <p>Are there any limitations regarding accessing Microsoft Excel on a Novel Workstation, alternatively, is there a better way to access Excel documents?</p>
  
  <p>Note: I just want to read from the Excel document, it spans multiple rows, columns and spreadsheets, the source Excel documents are *.xls 2007 documents.</p>
  
  <p>It's primary function was to enable automated reconciliation against the Excel document.</p>
  
  <p>Here is a snippet of the library code</p>
  
  <pre><code>library MyLibrary;
  uses
    SysUtils, Classes, Variants, Dialogs, StdCtrls, OleServer, ExcelXP, Windows;
  Type
    PString=String[254];
  
  Var
    ExcelObj : TExcelApplication;
  
  Procedure XLSOPEN(THENAME:PSTRING;VAR Reslt:PSTRING); stdcall;
  Begin
    If FileExists(THENAME) Then
    Begin
      ExcelObj := TExcelApplication.Create(nil);
      ExcelObj.ConnectKind := ckRunningOrNew;
      ExcelObj.Connect;
  
      If ExcelObj=nil Then
      Begin
        Result := 'Error : EXCEL couldnt be started!';
        Exit;
      End Else
      Begin
        Result := 'Successful';
        Exit;
      End;
    End Else
    Begin
      Result := 'Error : File '+THENAME+' does not exist!';
      Exit;
    End;
  End;
  
  Exports XLSOPEN Name 'XLSOpen';
  
  Begin
  End.
  </code></pre>