Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Grouping Rows in Excel using client_ole2

JohnHuizingaApr 15 2014 — edited Apr 15 2014

Forms [32 Bit] Version 10.1.2.3.0 (Production)

Windows 7

I have been unable to figure out how to group rows using client_ole2. An exhaustive Google search only gave me one chunk of example code. This is what I've tried:

    args := Client_OLE2.CREATE_ARGLIST;

    Client_OLE2.ADD_ARG(args, 'A6:R8'); --Just an example. I use variables for the row numbers.

    range := CLIENT_OLE2.GET_OBJ_PROPERTY(worksheet,'Range',args) ;

    CLIENT_OLE2.DESTROY_ARGLIST(args);

    client_ole2.invoke ( Range, 'Select' );  --I added this line to see if it would help. It didn't.

    client_ole2.invoke(range,'Group');

I get the error:

WUO-707 [OleFunctions.invoke_obj()] Unable to invoke Method: Group; Exception

com.jacob.com.ComFailException: Invoke of: Group

Source: Microsoft Office Excel

Description: Unable to get the Group property of the Range class

...which may be informative to someone but it just tells me it didn't work.

I saw a post somewhere that suggested that if you can record it in a macro you can figure out a way to do it in client_ole2 (well that might not have been exactly what was said but I'm an optimist). In the spirit of that, here is what I want to do in VBA syntax.

    Range("A6:R8").Select

    Selection.Rows.Group

Can anybody suggest a solution for me?

This post has been answered by Andreas Weiden on Apr 15 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 13 2014
Added on Apr 15 2014
2 comments
344 views