Home » Developer & Programmer » Forms » DDE package with Open Office. (Oracle Developer 6I)
DDE package with Open Office. [message #515309] Sun, 10 July 2011 08:02 Go to next message
mehediu
Messages: 46
Registered: February 2010
Location: Dhaka
Member

Hi Experts,

I am trying to read/write Open Office scalc.exe(which is replacement of Excel file) file using DDE Package as like Excel File. But it is giving me non oracle Exception Error when it focused or initiate.


I search the forum about this topic, but i don't find anything related about this.

If anyone have any idea or suggestion please response.


Thanking you
Md. Mehedi Hossain

Re: DDE package with Open Office. [message #515311 is a reply to message #515309] Sun, 10 July 2011 08:19 Go to previous messageGo to next message
Michel Cadot
Messages: 68675
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Maybe you can do it if you do it correctly or maybe not.

Regards
Michel
Re: DDE package with Open Office. [message #515499 is a reply to message #515311] Mon, 11 July 2011 23:26 Go to previous message
mehediu
Messages: 46
Registered: February 2010
Location: Dhaka
Member

Thank You,
Mr. Michel.

here is the code i used. can you tell me where is the problem is ?

declare
CONVID PLS_INTEGER;
APPID PLS_INTEGER;
i number;
x number;

v_date varchar2(13);
v_batNO varchar2(13);
v_trnsl varchar2(13);
v_trncod varchar2(13);
v_chqpfx varchar2(10);
v_chqvno varchar2(13);
v_trnamt varchar2(25);
v_srvcod varchar2(25);
v_orgbrcod varchar2(10);

v_cnt number;


BEGIN

synchronize;
Appid := dde.app_begin('C:\Program Files\OpenOffice.org 3\program\scalc.exe C:\paywrnt.ods',dde.app_mode_minimized);

msgbox('ALERT_ERROR',Appid,'');

dde.app_focus(appid);

msgbox('ALERT_ERROR',2,'');

convid := dde.initiate('scalc',/*:BLOCK2.SHEET_NAME*/'Sheet1' );
msgbox('ALERT_ERROR',2,'');

set_application_property(cursor_style,'BUSY'); 
i := 1;
x := 1;
loop
dde.request(convid,'R' || to_char(i) ||'C1',v_date,dde.cf_text,100000);
dde.request(convid,'R' || to_char(i) ||'C2',v_batNO,dde.cf_text,100000);
dde.request(convid,'R' || to_char(i) ||'C3',v_trnsl,dde.cf_text,100000);
---
dde.request(convid,'R' || to_char(i) ||'C4',v_trncod,dde.cf_text,100000);
dde.request(convid,'R' || to_char(i) ||'C5',v_chqpfx,dde.cf_text,100000);
dde.request(convid,'R' || to_char(i) ||'C6',v_chqvno,dde.cf_text,100000);
dde.request(convid,'R' || to_char(i) ||'C7',v_trnamt,dde.cf_text,100000);
---
dde.request(convid,'R' || to_char(i) ||'C8',v_srvcod,dde.cf_text,100000);
dde.request(convid,'R' || to_char(i) ||'C9',v_orgbrcod,dde.cf_text,100000);
 

message(length(replace(v_batNO,' ',null))||'---'||v_batNO||'---'||v_trnamt);

i:= i + 1;
exit when length(replace(v_date,' ',null))<=2;

end loop;
msgbox('ALERT_ERROR',x||'-->lines can not uploaded due to errors.','Error');
dde.terminate(convid);
dde.app_end(appid);





exception
	when others then 
	msgbox('ALERT_ERROR',sqlerrm,'Error');
END;
Previous Topic: Validate after write in textitem [merged]
Next Topic: REPLACE_MENU Problem
Goto Forum:
  


Current Time: Sun Sep 08 23:00:12 CDT 2024