Einzelnen Beitrag anzeigen

API

Registriert seit: 18. Apr 2004
637 Beiträge
 
#1

Excel öffnen - EOleSysError

  Alt 3. Apr 2012, 08:41
Hallo

Ich öffne Excel mit Late Binding wie folgt:

Delphi-Quellcode:
  try
    XlsApp := GetActiveOleObject('Excel.Application');
  except
    XlsApp := CreateOleObject('Excel.Application');
  end;
Das Problem ist, dass eine Fehlermeldung erscheint, wenn schon eine Arbeitsmappe geöffnet ist und sich der User zugleich in einem Arbeitsblatt im Editiermodus befindet (nach Doppeklick auf Zelle).

Wie kann ich das umgehen?

Zitat:
exception class : EOleSysError
exception message : Aufruf wurde durch Aufgerufenen abgelehnt.

main thread ($c38):
004c1270 +014 MeineExe.exe ComObj OleError
004c1288 +010 MeineExe.exe ComObj OleCheck
004c1d5c +0cc MeineExe.exe ComObj GetIDsOfNames
004c1df9 +071 MeineExe.exe ComObj VarDispInvoke
0045e62a +096 MeineExe.exe Variants _DispInvoke
  Mit Zitat antworten Zitat