Help for ole2 and excel97

From: Raffin Jean-Noel <jnraffin_at_ifremer.fr>
Date: Fri, 9 Oct 1998 15:50:05 +0200
Message-ID: <6vl4ae$sc6$1_at_ys.ifremer.fr>



I work with forms4.5 (16 bits) et excel 97 .

I want to load a form from an excel file . So I wrote a package in a library:

PROCEDURE active_excel(fichier varchar2) IS BEGIN
monappli := OLE2.CREATE_OBJ('Excel.application'); OLE2.SET_PROPERTY(monappli,'Visible','False');

classeurs := OLE2.INVOKE_OBJ(monappli,'Workbooks');

arg := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(arg,fichier);
monclasseur := OLE2.INVOKE_OBJ(classeurs,'Open',arg); OLE2.DESTROY_ARGLIST(arg);

arg := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(arg,'Feuil1');
mafeuille := OLE2.INVOKE_OBJ(monclasseur,'Worksheets',arg); OLE2.INVOKE(mafeuille,'Select');
OLE2.DESTROY_ARGLIST(arg);
.
.
.

but when i run the form in debug mode
 the line
classeurs := OLE2.INVOKE_OBJ(monappli,'Workbooks'); [Quoted] causes an exception error.

does anyone have an idea

Thanks

Jean.Noel.Raffin_at_ifremer.fr Received on Fri Oct 09 1998 - 15:50:05 CEST

Original text of this message