I am creating a procedure in oracle Forms, which will write to excel with some columns.

Now I want the column generation to be Dynamic during runtime.So for that, I Get all the columns list from the loop and that column I will use as a Heading in Excel.

For Dynamic Column Generation Following Code I have Written
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
{
Declare
Cursor Temp is
Select stk_1,stk_2,stk_3,stk_4 From ABC;