Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

please help me <OLE2>

478533Jul 27 2006 — edited Jul 28 2006
Hi

As DDE package is not supported in 10g, i'm using client_ole2 to export data from
FORMS to EXCEL.We had a standared format in the excel with heading, i'm trying to open that excel file and insert the data.My problem is, it is opening the
file but data is not inserting. For testing i'm inserting a single text into it.
code is as follows

////////////////***********************//////////////////////////////

declare
application client_ole2.obj_type;
workbooks client_OLE2.OBJ_TYPE;
workbook client_OLE2.OBJ_TYPE;
worksheets client_OLE2.OBJ_TYPE;
worksheet client_OLE2.OBJ_TYPE;
args1 client_ole2.list_type;
COMMAND1 VARCHAR2(5000);
cell client_OLE2.OBJ_TYPE;



BEGIN

COMMAND1 := 'C:\CF_TEMP_ver23112005.xls';

application := Client_OLE2.create_obj('Excel.Application');

workbooks := Client_OLE2.Get_Obj_Property(application, 'Workbooks');

args1 := Client_Ole2.create_arglist;
Client_Ole2.add_arg(args1, COMMAND1);
CLIENT_OLE2.SET_PROPERTY(application,'Visible',1);
workbook := Client_Ole2.invoke_obj(workbooks, 'Open', args1);
worksheets := Client_Ole2.get_obj_property(workbook, 'worksheets');

CLIENT_OLE2.destroy_arglist(args1);

args1:=client_OLE2.CREATE_ARGLIST;
client_OLE2.ADD_ARG(args1, 19);
client_oLE2.ADD_ARG(args1, 3);
cell:=client_OLE2.INVOKE_OBJ(worksheet, 'Cells', args1);
client_OLE2.DESTROY_ARGLIST(args1);


client_OLE2.SET_PROPERTY(cell, 'Value', 'deptno');
end;

//////////////////*********************////////////////////////
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2006
Added on Jul 27 2006
3 comments
881 views