Dear David
I have written my code but problem is EXCEL is open in the backgroud [ I checked EXCEL service is on and when i open it from OS file open into readonly mode with alert "file alrady open for the another user"], but it is not visible. I want to open the EXCEL for the user working. How I can open it. please guide me.
Procedure View_File (v_FileName in varchar2) is
v_ViewFile varchar2(100);
args ole2.list_type;
application ole2.obj_type;
workbooks ole2.obj_type;
workbook ole2.obj_type;
worksheets ole2.obj_type;
worksheet ole2.obj_type;
temp varchar2(200);
Begin
change_attrib(v_filename,'1');
application := ole2.create_obj('Excel.Application');
ole2.set_property(application,'visible',1);
workbooks := ole2.get_obj_property(application,'workbooks');
args := ole2.create_arglist;
ole2.add_arg(args,filelocation||v_filename);
workbook := ole2.get_obj_property(workbooks,'Open',args);
ole2.destroy_arglist(args);
ole2.release_obj(workbooks);
ole2.release_obj(workbook);
ole2.release_obj(application);
End View_File;
[EDITED by DJM: formatted the code and applied [code] tags]
[Updated on: Tue, 27 July 2010 03:25] by Moderator
Report message to a moderator