You can create csv file which can open into Excel worksheet. Assume you have emp block and has empno and ename columns
Do you want to pass data from the forms block or from the cursor
From Forms Block :
Write trigger WHEN-BUTTON-PRESSED
GO_BLOCK('EMP');
text_io.fopen('EMPDATA.CSV
', 'W');
FIRST_RECORD;
LOOP
Text_IO.Put('EMPDATA.CSV',
:emp.empno
);
Text_IO.Put('EMPDATA.CSV',
:emp.ename
);
NEXT_RECORD;
IF :SYSTEM.LAST_RECORD = 'TRUE' THEN
EXIT;
END IF;
END LOOP;
text_io.fclose('EMPDATA.CS
V');
This will create csv file on your middle tier. As you not specified where you want to create file. This is easiest solution. You can use utl_file to create on database server . If you want to create file on client side, Oracle provided code to do it on client side using OLE on the client using WebUtil.
http://www.oracle.com/technetwork/developer-tools/forms/howto-ole-090332.htmlThis will explain you one column example, but you can add it as per your requirement.
Hope this will help.