Andreas Hansson
2007-09-18 08:10:09 UTC
Hi,
I'm currently rebuilding an old software made with Delphi 7 in D2006
and now I've come to an export to Excel function.
The old code(a part of it):
var
xls, wb, Range: OLEVariant;
arrData: Variant;
begin
...
xls := CreateOLEObject('Excel.Application');
wb := xls.Workbooks.Add;
...
end;
However this does not work in D2006.
Ive added "Variants, ComObj, ComCtrls" to uses, just as it was in D7
I get:
Undeclared identifier: 'CreateOLEObject'
When looking in the help file CreateOLEObject should be in the ComObj
unit, and I've alreade added that to uses.
I've tried to find examples but all are using CreateOLEObject.
Why can't I use this funktion?
Is there an another way?
I'm using D2006 arc and the app is an ECO app, if that has anything to
do with it.
Help most apriciated!
/Andreas
I'm currently rebuilding an old software made with Delphi 7 in D2006
and now I've come to an export to Excel function.
The old code(a part of it):
var
xls, wb, Range: OLEVariant;
arrData: Variant;
begin
...
xls := CreateOLEObject('Excel.Application');
wb := xls.Workbooks.Add;
...
end;
However this does not work in D2006.
Ive added "Variants, ComObj, ComCtrls" to uses, just as it was in D7
I get:
Undeclared identifier: 'CreateOLEObject'
When looking in the help file CreateOLEObject should be in the ComObj
unit, and I've alreade added that to uses.
I've tried to find examples but all are using CreateOLEObject.
Why can't I use this funktion?
Is there an another way?
I'm using D2006 arc and the app is an ECO app, if that has anything to
do with it.
Help most apriciated!
/Andreas