How to save the exported Excel files from Oracle Forms 6

10 pts.
Tags:
Microsoft Excel
Object Linking and Embedding
OLE
Oracle Forms
Oracle import/export
Hi, I am using oracle forms 6.0. I generate multiple excel files from oracle forms and am using ole2 to export the data into excel. But i dont know how to save those files into the local machine. please someone help me. Thanks in advance

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

try the
following code.
DECLARE
     rr varchar(20); 
     ss varchar(20);
     oo varchar(20);
    appid pls_integer; 
    convid pls_integer; 
     x  number;
     nm  number:=1; 
     rowcol varchar(20);
     cursor mm is select ENAME from emp;
BEGIN 
  appid :=dde.app_begin(‘C:\Program Files\Microsoft
Office\OFFICE11\excel.exe c:\abc.xls’,dde.app_mode_minimized); 
  convid := dde.initiate(‘EXCEL’,’c:\abc.xls’); 
–%%%%to run macro
               –dde.execute(convid,'[run(“Macro1″)]’,1000);  
–%%% add spicific titel to row2 & column1
    –rowcol := ‘R2C1′; 
    –dde.poke(convid,rowcol,’Put a title
here’,dde.cf_text,1000); 
–%%% 
open mm;
 loop
      fetch mm into
oo;
     exit when mm%notfound;
     rowcol := ‘R’||nm||’C1′; 
  dde.poke(convid,rowcol,oo,dde.cf_text,1000);
  nm:=nm+1;
 end loop;
 dde.terminate(convid);
dde.app_end(appid);  
    end;
Note:-
create abc.xls and also add u r own path for office.

Hope this helps.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following