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 Go to next message](/forum/theme/orafaq/images/down.png) |
tarek_fathi2003
Messages: 6 Registered: March 2006 Location: EGYPT
|
Junior Member |
![tarek_fathi2003%40YAHOO.COM](/forum/theme/orafaq/images/yahoo.png)
|
|
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 codedeclare
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
|
|
|
|
|