Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Excel 2000 : 'OLE-Fehler 800A03EC'

482 views
Skip to first unread message

SoftSupport GmbH, Karlsruhe

unread,
Jul 19, 2000, 3:00:00 AM7/19/00
to
when I try the following code

var x: string;
x:= ExcelApplication1.Range['A1','A1'].Value;


I get an 'OLE-Fehler 800A03EC'

What does this error numer 800A03EC express ??


bye
Stephan Hartmann

Deborah Pate

unread,
Jul 23, 2000, 3:00:00 AM7/23/00
to
<<Karlsruhe SoftSupport GmbH:

What does this error numer 800A03EC express ??
>>

Very little - it is Excel's favourite error number. There
is nothing wrong with the code that you've shown, as far as
I know - can you show us the code preceding it?

--
Deborah Pate


SoftSupport GmbH, Karlsruhe

unread,
Jul 24, 2000, 3:00:00 AM7/24/00
to
Hello Deborah,

here is an example code where I reduced my problem to the minimum.
With Button 1 Excel is started in the ole-container, button 2 should get the
contents of cell A1.

The compiled exe works fine with Excel 97, but generates an OLE-Error
800A03EC with Excel 2000,
when pressing the 2nd button.

It makes no difference if I use the delphi 5.0 components (excel97.pas) or
the delphi 5.01 version (excel2000).
Although an inserted ExcelApplication1.Connect before the ShowMessage has no
effect.

Regards

SoftSupport GmbH
i.A. Stephan Hartmann

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
OleCtnrs, StdCtrls, OleServer, Excel2000;

type
TForm1 = class(TForm)
oleExcel: TOleContainer;
Button1: TButton;
Button2: TButton;
ExcelApplication1: TExcelApplication;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
// start Excel on Buttonclick
begin
oleExcel.CreateObject('Excel.Sheet.8',FALSE);
oleExcel.DoVerb(ovShow)
end;

procedure TForm1.Button2Click(Sender: TObject);
// get Cell A1
begin
ShowMessage(ExcelApplication1.Range['A1','A1'].Value);
end;

end.


Deborah Pate <d.pate@cableinet.c

Deborah Pate

unread,
Jul 28, 2000, 3:00:00 AM7/28/00
to
<<Karlsruhe SoftSupport GmbH:

Excel is started in the ole-container
>>

You're using an olecontainer! Don't use the
TExcelApplication object, then, it's asking for trouble.
Just use variables:

var
Excel, Sheet: olevariant;
..
Sheet := OleContainer1.OleObject;
Excel := Sheet.Application;

Sheet.Range['A1'].Value := 4;

--
Deborah Pate


SoftSupport GmbH, Karlsruhe

unread,
Jul 31, 2000, 3:00:00 AM7/31/00
to
Hi,

when I try your code I get an error message (translated from german)

'Method 'RANGE' not supported from automatisation object'

I have modified it in the following way:
OleExcel.OleObject.Application.Range['A1'].Value:='2345';

ShowMessage(OleExcel.OleObject.Application.Range['A1'].Value);


My problem: it's working fine with Excel 97,but OLE-Error with Excel 2000
just like my original code

any ideas ?


bye

SoftSupport GmbH
i.A. S. Hartmann


Deborah Pate

unread,
Aug 2, 2000, 3:00:00 AM8/2/00
to
<<Karlsruhe SoftSupport GmbH:

when I try your code I get an error message
>>
Sorry, that's because of a silly mistake I invariably make
with olecontainers - of course the contained object is a
workbook, not a worksheet. However I had wanted to break
your code lines up a bit, to see if it was only the range
property that causes the problem, or any access to the
workbook.

If you start a new project, put a TOleContainer on it (but
no Excel components), and try the following code, where
does the error come?

var
Excel, WB, WS: OleVariant;
..
Olecontainer1.CreateObject('Excel.Sheet', False);
Olecontainer1.Doverb(ovPrimary);
WB := Olecontainer1.Oleobject;
Excel := WB.Application;
WS := WB.ActiveSheet;
Caption := WS.Name;
WS.Range['A1'].Value := 'First cell';

--
Deborah Pate


Stephan Hartmann

unread,
Aug 10, 2000, 3:00:00 AM8/10/00
to
Hi,

when I Did Your Code, suddenly it worked !
Well, when I looked at the differnces between the new and the old code,
I recognized that in Your code an 'ActiveSheet' is between application and
the Range.
Excel 97 isn't missing that, but Excel 2000 brings the error !

thanks for your help

Stephan


"Deborah Pate" <d.p...@cableinet.co.not-this-bit.uk> schrieb im Newsbeitrag
news:VA.0000016...@cableinet.co.not-this-bit.uk...

0 new messages