Excel data to tables [message #397101] |
Wed, 08 April 2009 23:19 |
sharathmpatil
Messages: 38 Registered: February 2008 Location: Bangalore
|
Member |
|
|
Hi all,
I have a requirement which goes like this,please suggest a solution for this.
I need to refer an excel sheet for a value from front end but the excel sheet consists of 6000 - 7000 records.I have to refer to only one column in this.
Thanks in advance
|
|
|
|
|
Re: Excel data to tables [message #397105 is a reply to message #397101] |
Thu, 09 April 2009 00:14 |
mm_kanish05
Messages: 493 Registered: January 2007 Location: Chennai
|
Senior Member |
|
|
Do you know read from which row and col, then frame like like below.
Procedure WriteIntoCell(rowno number,colno number,Fvalue varchar,typ varchar,border boolean, Font Boolean) Is
Begin
Arg := ole2.create_arglist;
ole2.add_arg(Arg,rowno);
ole2.add_arg(Arg,colno);
Cell := ole2.get_obj_property(WorkSheet,'Cells',Arg);
ole2.destroy_arglist(arg);
If typ = 'CHAR' Then
If Substr(Fvalue,1,1) = '0' Then
ole2.Set_property(Cell,'Value',''''||Fvalue);
Else
ole2.Set_property(Cell,'Value',Fvalue);
End if;
ole2.Set_property(Cell,'NumberFormat','@');
Else
If typ = 'NUMBER' Then
ole2.Set_property(Cell,'Value',Fvalue);
ole2.Set_property(Cell,'NumberFormat','####0.00');
Else
ole2.Set_property(Cell,'Value',Fvalue);
End if;
End if;
If substr(Fvalue,3,1) = '-' and substr(Fvalue,7,1) = '-' Then
ole2.Set_property(Cell,'NumberFormat','d-mmm-yyyy');
End If;
If Font Then
ExcelFont := ole2.get_obj_property(Cell,'Font');
ole2.Set_property(ExcelFont,'Bold','True');
ole2.Set_property(ExcelFont,'Size',10);
ole2.release_obj(ExcelFont);
End If;
If Border Then
V_border := ole2.get_obj_property(Cell,'Borders');
ole2.Set_property(V_border,'LineStyle',1);
ole2.release_obj(V_border);
End If;
arg := ole2.create_arglist;
ole2.add_arg(arg,colno);
ccol := ole2.get_obj_property(worksheet,'Columns', arg);
ole2.destroy_arglist(arg);
ole2.invoke(ccol,'Autofit');
ole2.release_obj(cell);
End WriteIntoCell;
The above one write into cell the same way u proceed read from cell.
kanish
|
|
|
|
|
|