|
|
|
Re: Transfer data from forms6i to excel(if u have better solution then plz mail it to me [message #80101 is a reply to message #80017] |
Sun, 11 August 2002 20:48 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
neeraj sharma
Messages: 4 Registered: January 2002
|
Junior Member |
|
|
AppID PLS_INTEGER;
C1onvID PLS_INTEGER;
rc varchar2(8);
rc1 varchar2(8);
Buffer1 VARCHAR2(550);
Buffer2 VARCHAR2(550);
ConvID1 PLS_INTEGER;
m_file varchar2(20);
p_file varchar2(100);
BEGIN
m_file := 'c:abc.xls';
p_file := 'c:progra~1micros~1officeexcel.exe '||' '||m_file;
AppID := DDE.APP_BEGIN(''||p_file||'',DDE.APP_MODE_MINIMIZED);
ConvID1 := DDE.INITIATE('EXCEL', ''||m_file||'');
go_block('sale_detail');
i:=3;
C := 'R' || LTRIM(RTRIM(TO_CHAR(I))||'C'||LTRIM(RTRIM(TO_CHAR(J))));
DDE.APP_FOCUS(AppID);
DDE.poke(ConvID1,RC,np,DDE.CF_TEXT,1000);
j:=j+1;
RC := 'R' || LTRIM(RTRIM(TO_CHAR(I))||'C'||LTRIM(RTRIM(TO_CHAR(J))));
DDE.APP_FOCUS(AppID);
DDE.poke(ConvID1,RC,np1,DDE.CF_TEXT,1000);
j:=j+1;
RC := 'R' || LTRIM(RTRIM(TO_CHAR(I))||'C'||LTRIM(RTRIM(TO_CHAR(J))));
DDE.APP_FOCUS(AppID);
DDE.poke(ConvID1,RC,np2,DDE.CF_TEXT,1000);
j:=j+1;
RC := 'R' || LTRIM(RTRIM(TO_CHAR(I))||'C'||LTRIM(RTRIM(TO_CHAR(J))));
DDE.APP_FOCUS(AppID);
DDE.poke(ConvID1,RC,np3,DDE.CF_TEXT,1000);
j:=j+1;
RC := 'R' || LTRIM(RTRIM(TO_CHAR(I))||'C'||LTRIM(RTRIM(TO_CHAR(J))));
DDE.APP_FOCUS(AppID);
DDE.poke(ConvID1,RC,np4,DDE.CF_TEXT,1000);
j:=j+1;
RC := 'R' || LTRIM(RTRIM(TO_CHAR(I))||'C'||LTRIM(RTRIM(TO_CHAR(J))));
DDE.APP_FOCUS(AppID);
DDE.poke(ConvID1,RC,np5,DDE.CF_TEXT,1000);
j:=j+1;
this works as i have created reports in excel thru this code in forms.
Upd-mod: Add 'code' tags.
[Updated on: Wed, 01 February 2006 23:00] by Moderator Report message to a moderator
|
|
|
|
|