Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ole problem

Re: ole problem

From: Mark <mgumbs_at_hotmail.nospam.com>
Date: Wed, 20 Oct 1999 08:53:55 +0100
Message-ID: <380d73eb.0@145.227.194.253>


Use...

cell := ole2.Get_Obj_Property(wk,'Cells',args);

Mark

<raqgf_at_my-deja.com> wrote in message news:7uid40$mu9$1_at_nnrp1.deja.com...
>
>
> Sombody know why this code doesn't work ?
> It fails en the line : cell := ole2.invoke_obj(wk,'Cells',args);
>
> DECLARE
> app ole2.obj_type;
> wbks ole2.obj_type;
> wbk ole2.obj_type;
> wks ole2.obj_type;
> wk ole2.obj_type;
> cell ole2.obj_type;
>
> args ole2.list_type;
> BEGIN
> app:=ole2.create_obj('Excel.Application');
>
> ole2.set_property(app,'Visible',1);
>
> wbks := ole2.get_obj_property(app, 'workbooks');
>
> args := ole2.create_arglist;
> ole2.add_arg(args,'c:\usr\proh.xls');
> wbk:=ole2.invoke_obj(wbks,'open',args);
> ole2.destroy_arglist(args);
>
> wk:= ole2.get_obj_property(app,'activesheet');
>
> args := ole2.create_arglist;
> ole2.add_arg(args,2);
> ole2.add_arg(args,2);
> cell:=ole2.invoke_obj(wk,'Cells',args);
> ole2.destroy_arglist(args);
>
> ole2.set_property(cell,'value',5);
> EXCEPTION
> when others then
> message('Error: '||to_char(sqlcode)||' '||sqlerrm);
> message('excep ole: '||ole2.last_exception);
> message(ole2.last_exception);
> END;
>
> Thanks Raquel
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Oct 20 1999 - 02:53:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US