Home » Developer & Programmer » Forms » OLE2 - Forms to Excel data format
OLE2 - Forms to Excel data format [message #260380] Sun, 19 August 2007 06:51 Go to next message
vdsk
Messages: 41
Registered: February 2006
Location: India & UAE
Member
I am using Form6i on 10g.My Form trigger has code as:

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',:item_block.item_code);
ole2.release_obj(cell);

Problem is , whenever :item_block.item_code start with '0' the Excel column cuts off the '0' and gives the numeric part of data only.
Eg: Form data '009856' converts to Excel as 9856.
How to fix this as same as Form output ??
Re: OLE2 - Forms to Excel data format [message #260472 is a reply to message #260380] Mon, 20 August 2007 01:25 Go to previous messageGo to next message
vdsk
Messages: 41
Registered: February 2006
Location: India & UAE
Member
Hi all...
I found the solution myself. By adding a '' as prefix.
The code looks like this :-
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',''''||:item_block.item_code);
ole2.release_obj(cell);

May be it was far too simple for me to find it.!! Laughing

thanks
Re: OLE2 - Forms to Excel data format [message #385997 is a reply to message #260472] Thu, 12 February 2009 03:19 Go to previous message
SUHAS22845
Messages: 51
Registered: August 2008
Location: BANGALORE
Member

Dear VDSK,

Can you please send me the entire code, which u have written. I am in need for it very desperately. Kindly provide me with the code asap.
Previous Topic: How to add graphics to the form webpage?
Next Topic: FRM-92101 - URGENT!!!
Goto Forum:
  


Current Time: Sat Dec 10 03:33:01 CST 2016

Total time taken to generate the page: 0.08785 seconds