Home » Developer & Programmer » Forms » excel sheet on local machine (oracle forms 10g oracle Database 10g)
excel sheet on local machine [message #597941] Wed, 09 October 2013 06:09 Go to next message
furqan
Messages: 115
Registered: January 2012
Location: Hyderabad
Senior Member
hello sir,
i am accessing a form from server through URL using oracle application server FORMS & REPORT services.
and i am trying to export table data into excel sheet on my local machine or the server itself.

i am using the following code on WHEN BUTTON PRESSED
PROCEDURE REFERENCELIST IS
BEGIN
DECLARE
AppID PLS_INTEGER;
ConvID PLS_INTEGER;
RCount Number := 0;
CURSOR c1 IS SELECT MATID, MATCODE ,DESCRIPTION ,  PARTNO FROM REFERENCETABLE;
PROCEDURE INSERTROW (invalue VARCHAR2, incol NUMBER) IS
   
BEGIN
DDE.POKE(ConvID, 'R'||TO_CHAR(RCount)||'C'||TO_CHAR(incol), invalue, DDE.CF_TEXT, 1000);
END INSERTROW;

BEGIN
RCount := 1;
AppID := DDE.APP_BEGIN('C:\Program Files\Microsoft Office\Office14\EXCEL.EXE', DDE.APP_MODE_MAXIMIZED);
ConvID := DDE.INITIATE('EXCEL', 'system');
DDE.EXECUTE(ConvID, '[Save.As("' || 'D:\REFERENCE_LIST.XLS' || '",1)]',10000);
ConvID := DDE.INITIATE('EXCEL', 'D:\REFERENCE_LIST.XLS');

INSERTROW  ('MATID', 1)             ;
INSERTROW  ('MATCODE', 2)           ;
INSERTROW  ('DESCRIPTION', 3)           ;
INSERTROW  ('PARTNO', 4)           ;


FOR INV IN c1 LOOP
RCount := RCount + 1;

INSERTROW(NVL(TO_CHAR(INV.MATID),' '), 1);
INSERTROW(NVL(INV.MATCODE,' '), 2);
INSERTROW(NVL(INV.DESCRIPTION,' '), 3);
INSERTROW(NVL(INV.PARTNO,' '), 4);

END LOOP;
END;


help please..this does not give any error and any result as well.
the above code very much fine while i run it on my local laptop.


[Updated on: Wed, 09 October 2013 06:29]

Report message to a moderator

Re: excel sheet on local machine [message #598012 is a reply to message #597941] Wed, 09 October 2013 14:07 Go to previous message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member

http://www.orafaq.com/forum/?SQ=2452b0fc7712c457b99ff0effd8980a7&t=search&srch=export+excel&btn_submit=Search&field=a ll&forum_limiter=17&search_logic=AND&sort_order=DESC&author



Regard
Mughal
Previous Topic: Form Runtime error
Next Topic: forms 10g, win xp 32 bit
Goto Forum:
  


Current Time: Fri Apr 26 08:49:45 CDT 2024