Re: Qs about OLE automation (MS excel)

From: <maschout_at_my-deja.com>
Date: Wed, 29 Sep 1999 11:33:07 GMT
Message-ID: <7sstdk$slp$1_at_nnrp1.deja.com>


Hello Katherine,

Your problem can be solved by replacing
> c := ole2.invoke_obj(d, 'Cells', lst);

    with

        c := ole2.get_obj_handle(d, 'Cells', lst);

Therefore, invoke_obj message 305500 is a known bug I heard.

But, maybe you can help me with my problem selecting/activating a specific sheet within my active workbook. I tried the following:

  args:=OLE2.CREATE_ARGLIST;
  OLE2.ADD_ARG(args, 'Sheetname');

  worksheet := OLE2.get_obj_property(worksheets, 'Activate', args);   OLE2.DESTROY_ARGLIST(args);

Any help would be appreciated

Marcel

maschout_at_westbrabant.net

In article <6GuB3.19062$m7.282786_at_quark.idirect.com>,   "Steve Cormier" <scormier_at_idirect.com> wrote:
> I create OLE container spreadsheet in the Form 5.0. In the OLE
container, I
> insert MS excel worksheet object. into container, I try to access
cells in
> the excel spread sheet. I always get the error message which raises
> unhandled exeception ORA- 305500. Does anybody have any idea? Any
suggestion
> is appreciated!
>
> Enclosed is my code.
>
> Thanks!
>
> ======
> Katherine
>
> Kweng_at_yahoo.com
>
> declare
> d ole2.obj_type;
> c ole2.obj_type;
> n number;
> lst ole2.list_type;
>
> BEGIN
> if not forms_ole.server_active('spreadsheet') then
> formS_ole.activate_server('spreadsheet');
> obj_hnd := forms_ole.get_interface_pointer('spreadsheet');
> end if;
>
> lst := ole2.create_arglist;
> ole2.add_arg(lst, trow);
> ole2.add_arg(lst, col);
>
> c := ole2.invoke_obj(d, 'Cells', lst);
> ......
> END;
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Sep 29 1999 - 13:33:07 CEST

Original text of this message