The examplecode written works on a win98 client having excel version 97.
But doesnt work on a win2000 client with excel2000
I would like to know the source code for a win2000 client with excel2000.
Any help would be apprecaited [mail to mikaily_at_wanadoo.nl ]
While running the example code below, I am continually receiving the
following error message:
FRM-40735 WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-305500.
example code:
DECLARE
- Declare the OLE objects
application ole2.obj_type ;
workbooks ole2.obj_type ;
workbook ole2.obj_type ;
worksheets ole2.obj_type ;
worksheet ole2.obj_type ;
cell ole2.obj_type ;
- Declare handles to OLE argument lists
args ole2.list_type ;
BEGIN
- Start Excel and make it visible
application := ole2.create_obj ('Excel.Application');
ole2.set_property (application, 'Visible', True);
- Return object handle to the Workbooks collection
workbooks:= ole2.invoke_obj (application, 'Workbooks');
- Add a new Workbook object to the Workbooks collection
workbook := ole2.invoke_obj (workbooks,'Add');
- Return object handle to the Worksheets collection for the
- Workbook
worksheets := ole2.invoke_obj (workbook, 'Worksheets');
- Add a new Worksheet to the Worksheets collection
worksheet := ole2.invoke_obj (worksheets,'Add');
- Return object handle to cell A1 on the new Worksheet
args:= ole2.create_arglist ;
ole2.add_arg(args, 1);
ole2.add_arg(args, 1);
cell:= ole2.invoke_obj (worksheet, 'Cells', args);
ole2.destroy_arglist (args);
- Set the contents of the cell to 'Help me!'
ole2.set_property (cell, 'Value', 'Help me!');
- Release the OLE objects
ole2.release_obj (cell);
ole2.release_obj (worksheet);
ole2.release_obj (worksheets);
ole2.release_obj (workbook);
ole2.release_obj (workbooks);
ole2.release_obj (application);
END;
Received on Fri Jan 10 2003 - 19:29:45 CST