Home » Developer & Programmer » Forms » how to synchronize a cell in form with a cell in MS excel sheet
how to synchronize a cell in form with a cell in MS excel sheet [message #163030] Tue, 14 March 2006 11:41 Go to next message
tarek_fathi2003
Messages: 6
Registered: March 2006
Location: EGYPT
Junior Member

Dear all
I can successfuly export data to excell using the ole2 package. But the problem is that exporting data from A datablock in a form to Excel sheet is not enough.
I need to automaticaly copy updates occures on the datablock to its equilivant in the excel sheet. In other words , I need to synchronize my datablock items with facing cells in the excel sheet,so the cells'values in excel sheet automatiacly changes to be the values in the datablock items

I searched the web several times . Some people adviced me to use "Apache-jakarta-poi" . It is a pure java code. But my knoledge in java is limited.I asked on Oracle forums -
http://forums.oracle.com/forums/thread.jspa?threadID=369851&tstart=0 - but no one can help

I tried the oracle forms demo "OLEEXCEL.fmb" . But this form is not working correct .

I need to embed ole2 in my form that holds excel sheet and passes values from text items to the excel sheet.

My last try is that I did the following :
1- in the main canvas i insert the OLE2 control
2- Right Click and choose insert
3- from the dialog i chosed Excel Sheet
4- I placed a button on my canvas then i on the button I write this code
declare
 worksheet ole2.obj_type;
 cell      ole2.obj_type;
 args      ole2.list_type;
begin
 forms_ole2.activate_server('block1.excel_sheet');
 worksheet := forms_ole2.get_interface_pointer('block1.excel');
 args      := ole2.create_arglist;
 ole2.add_arg(args,1) -- column1
 ole2.add_arg(args,1) -- cell1
 cell := ole2.invoke_obj(worksheet,'cell',args);
 ole2.destroy_arglist(args);
 ole2.set_property('cell','value',:text1);
 ole2.release_obj(cell);
 ole2.release_obj(worksheet);
end;

I get this error ora-305500
and when i debug , the code stop in this line : cell := ole2.invoke_obj(worksheet,'cell',args);
please help

[Updated on: Tue, 14 March 2006 21:21] by Moderator

Report message to a moderator

Re: how to synchronize a cell in form with a cell in MS excel sheet [message #163084 is a reply to message #163030] Tue, 14 March 2006 21:25 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have a look at http://www.orafaq.com/forum/m/154273/67467/?srch=forms_ole2#msg_154273 which leads to http://www.orafaq.com/forum/m/124560/67467/?srch=OLE2.OBJ_TYPE#msg_124560

David
Re: how to synchronize a cell in form with a cell in MS excel sheet [message #163229 is a reply to message #163084] Wed, 15 March 2006 11:19 Go to previous message
tarek_fathi2003
Messages: 6
Registered: March 2006
Location: EGYPT
Junior Member

thank you so much David For replying . In fact I'll check these links and reply again
thanks again
Previous Topic: CHANGING RECORD COLOUR DYNAMICALLY
Next Topic: List Item Problem
Goto Forum:
  


Current Time: Fri Sep 20 07:52:07 CDT 2024