Home » Developer & Programmer » Forms » Very Urgent(Passing Parameters)
Very Urgent(Passing Parameters) [message #308318] Mon, 24 March 2008 01:02 Go to next message
oralce
Messages: 1
Registered: March 2008
Location: India
Junior Member
Hi Gurus,

I have a problem in importing data in excel. I am getting data of my report from when-button-press trigger.But I am facing problem in filtering data (problem in passing parameters).

For below code i am getting data but without parameters.

declare
application ole2.obj_type;
workbooks ole2.obj_type;
workbook ole2.obj_type;
worksheets ole2.obj_type;
worksheet ole2.obj_type;
cell ole2.obj_type;
args ole2.list_type;
rowcount integer;
v_cust_code om_customer.cust_code%type;
cursor c1(v_cust_code om_customer.cust_code%type) is SELECT CUST_CODE A,CUST_NAME B FROM OM_CUSTOMER
order by CUST_CODE;

begin

application := ole2.create_obj('Excel.Application');
ole2.set_property(application,'Visible','True');
workbooks := ole2.get_obj_property
(application,'Workbooks');
workbook := ole2.invoke_obj(workbooks,'Add');
worksheets := ole2.get_obj_property
(workbook,'Worksheets');
worksheet := ole2.invoke_obj(worksheets,'Add');

rowcount := 0;
for rec1 in c1(v_cust_code) loop
rowcount := rowcount + 1;
args := ole2.create_arglist;
ole2.add_arg(args,rowcount);
ole2.add_arg(args,1);
cell := ole2.get_obj_property(worksheet,'Cells',args);
ole2.destroy_arglist(args);
ole2.set_property(cell,'Value',rec1.A);
ole2.release_obj(cell);


args := ole2.create_arglist;
ole2.add_arg(args,rowcount);
ole2.add_arg(args,2);
cell := ole2.get_obj_property(worksheet,'Cells',args);
ole2.destroy_arglist(args);
ole2.set_property(cell,'Value',rec1.B);
ole2.release_obj(cell);
end loop;


ole2.release_obj(worksheet);
ole2.release_obj(worksheets);
ole2.release_obj(workbook);
ole2.release_obj(workbooks);
ole2.release_obj(application);


end;

v_cust_code is not working in the above query.
I want to fliter data using DATE and with many things.Please help me in this.

Waiting for your earliest reply.

Thanks,

Rupesh.V.
Re: Very Urgent(Passing Parameters) [message #308918 is a reply to message #308318] Tue, 25 March 2008 23:25 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem? What are you trying to place in the Excel spreadsheet and what IS going into it at the moment?

David
Previous Topic: how attach list item values based on another list item
Next Topic: Update field
Goto Forum:
  


Current Time: Sun Dec 11 02:27:35 CST 2016

Total time taken to generate the page: 0.22370 seconds