OLE2 to Excel, error code -305550

From: Brian Membrey <horsemth_at_mel.switch.net.au>
Date: 1997/03/10
Message-ID: <01bc2d9a$62152e20$28a320cb_at_default>#1/1


Can anyone shed any light on an OLE2 automation link to Excel periodically returning an error SQLCODE '305500 User Defined Exception: About 50% of the Excel functions I've called are OK, but others collapse for no apparent (to my befuddled brain) reason. Eg The first call below is fine, but the second fails (both formulae are fine typed directly into Excel

application_id :=
  OLE2.CREATE_OBJ('EXCEL.APPLICATION.5'); arg_list := OLE2.CREATE_ARGLIST;

OLE2.ADD_ARG (arg_list, 125000); 
OLE2.ADD_ARG (arg_list, 25000);
OLE2.ADD_ARG (arg_list, 10);

:depreciation:= OLE2.GET_NUM_PROPERTY
(application_id, 'SLN', arg_list);
OLE2.DESTROY_ARGLIST(arg_list);

... but this fails with "user defined exception 305500'

application_id :=
  OLE2.CREATE_OBJ('EXCEL.APPLICATION.5'); arg_list := OLE2.CREATE_ARGLIST;

OLE2.ADD_ARG (arg_list, .0075); 
OLE2.ADD_ARG (arg_list, 360);
OLE2.ADD_ARG (arg_list, 125000);
OLE2.ADD_ARG (arg_list, 1);
OLE2.ADD_ARG (arg_list, 1);
OLE2.ADD_ARG (arg_list, 0);

:principal:= OLE2.GET_NUM_PROPERTY

   (application_id, 'CUMPRINC', arg_list); OLE2.DESTROY_ARGLIST(arg_list); Received on Mon Mar 10 1997 - 00:00:00 CET

Original text of this message