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 -> ole problem

ole problem

From: <raqgf_at_my-deja.com>
Date: Tue, 19 Oct 1999 18:26:25 GMT
Message-ID: <7uid40$mu9$1@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 Tue Oct 19 1999 - 13:26:25 CDT

Original text of this message

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