Home » Developer & Programmer » Forms » How to create excel pivot table using oracle forms ole2 package (oracle forms 10)
How to create excel pivot table using oracle forms ole2 package [message #418716] Tue, 18 August 2009 05:37 Go to next message
kris312566
Messages: 9
Registered: May 2009
Location: Mumbai
Junior Member
I am using oracle forms 9i ole2 package for creating microsoft excel worksheets and want to use microsoft excel pivot table function
using ole2. I am able to use many excel commands like (insert chart, create
multiple worksheets, filter, run macro) but i am not able to use create pivot
table command of excel.
-----------------------------------------------------------
this is what i got when imported ole liberary for pivot table.

FUNCTION PivotTableWizard(interface OleObj, SourceType OleVar := OleVar_Null, SourceData OleVar := OleVar_Null,
TableDestination OleVar := OleVar_Null, TableName OleVar := OleVar_Null, RowGrand OleVar := OleVar_Null,
ColumnGrand OleVar := OleVar_Null, SaveData OleVar := OleVar_Null, HasAutoFormat OleVar := OleVar_Null,
AutoPage OleVar := OleVar_Null, Reserved OleVar := OleVar_Null) RETURN OleVar IS
my_new_value OleVar;
BEGIN
Init_OleArgs(10);
Add_OleArg(SourceType);
Add_OleArg(SourceData);
Add_OleArg(TableDestination);
Add_OleArg(TableName);
Add_OleArg(RowGrand);
Add_OleArg(ColumnGrand);
Add_OleArg(SaveData);
Add_OleArg(HasAutoFormat);
Add_OleArg(AutoPage);
Add_OleArg(Reserved);
my_new_value := Call_Ole_Var(interface, 684);
return my_new_value;
End;
----------------------------------------------------------------
when tried to use the same function it gives error.
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args,'xlDatabase');
OLE2.ADD_ARG(args,'Sheet4!R1C1:R11C3');
OLE2.ADD_ARG(args,'Sheet4!R1C9');
OLE2.ADD_ARG(args,'PivotTable1');
OLE2.ADD_ARG(args,'Student');
OLE2.ADD_ARG(args,'Marks');
OLE2.ADD_ARG(args,'SaveData');
OLE2.ADD_ARG(args,'HasAutoFormat');
hShape := OLE2.INVOKE_OBJ(worksheet,'PivotTableWizard',args);
OLE2.DESTROY_ARGLIST(args);
Re: How to create excel pivot table using oracle forms ole2 package [message #422618 is a reply to message #418716] Thu, 17 September 2009 21:07 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Search this forum for 'pivot' and look in the MS Excel help for the various facilities that you need to use.

David
Previous Topic: forms 10g/windows mobile
Next Topic: WebUtil utility
Goto Forum:
  


Current Time: Fri Sep 20 09:49:00 CDT 2024