Home » Developer & Programmer » Forms » Excel data to tables (Forms,6i,Win xp)
Excel data to tables [message #397101] Wed, 08 April 2009 23:19 Go to next message
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 #397103 is a reply to message #397101] Wed, 08 April 2009 23:34 Go to previous messageGo to next message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member

Search for ole2

kanish
Re: Excel data to tables [message #397104 is a reply to message #397103] Wed, 08 April 2009 23:38 Go to previous messageGo to next message
sharathmpatil
Messages: 38
Registered: February 2008
Location: Bangalore
Member
I have ole2 but is it advisable to store 6000 rows just for reading value from 1 row
Re: Excel data to tables [message #397105 is a reply to message #397101] Thu, 09 April 2009 00:14 Go to previous messageGo to next message
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
Re: Excel data to tables [message #397106 is a reply to message #397101] Thu, 09 April 2009 00:24 Go to previous messageGo to next message
sharathmpatil
Messages: 38
Registered: February 2008
Location: Bangalore
Member
Hi kanish,

I need to read from a cell not write into it.

Thanks .
Re: Excel data to tables [message #397107 is a reply to message #397101] Thu, 09 April 2009 00:47 Go to previous messageGo to next message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member



Quote:
The same way u proceed read from cell.


kanish
Re: Excel data to tables [message #397135 is a reply to message #397106] Thu, 09 April 2009 03:11 Go to previous message
shanthakumar.utt
Messages: 15
Registered: May 2008
Location: bangalore
Junior Member
Did u tried writing into cell what u get after writing into cell let me know

Regards
Shanthu
Previous Topic: DML Returning Value, on-update and field update
Next Topic: getting radio button prompt dynamically
Goto Forum:
  


Current Time: Mon Feb 03 20:47:58 CST 2025