Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anybody expert on package?

Status
Not open for further replies.

idran

Programmer
Nov 6, 2003
5
CH
ON forms6i .
Hi... I'm new on this forum and I'm from switzerland.I have a question.
I found an example on how read range of value from excel on forms HELP.....but they use a package that can't find anywhere......anybody can help me or say where can I find a similar package.....
the example that found is:
It's not normal give an example and don't give the package script. And on this topic there are only example and not explication.
If anybody can help me, I'm happy.


Example 2
/*
Get the value of a range of cells in Microsoft Excel for populating a PL/SQL table. The PL/SQL table can be used as a block data source.
*/

DECLARE
TYPE myrec IS RECORD (
x varchar2(10),
y varchar2(10),
z varchar2(10));

TYPE mytable is TABLE OF myrec
INDEX BY BINARY_INTEGER;

TableXYZ mytable;
Range OleVar;
Value OleVar;



BEGIN
/* Find the range of cells you want to interact with */
Range := EXCEL_WORKSHEET.ole_Range(
:CTRL.interface,
To_Variant('A1:C3'));

/* Get the value of cells in the range from A1 to C3 */
Value := EXCEL_RANGE.Value(Var_to_Obj(Range));

/* Populate PL/SQL Table; can access cell values using PL/SQL Syntax such as TableXYZ(1).x, TableXYZ(1).y, TableXYZ(2).x, TableXYZ(2).y, etc. */
Var_to_Table(Value,TableXYZ);
END;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top