Re: EUCOM & Formatting Excel Cells

new topic     » goto parent     » topic index » view thread      » older message » newer message

Tony Steward wrote:
> 
> Hi Matt,
> Thanks for replying, but I just don't understand how to use that info
> with your library.
> I have never wrapped any other lib before.
> Would you be able to spare a minute to explain The likes of how I
> would use BorderAround or AutoFit in such a way that I can go on from
> there.

Sorry, they're used in calls to invoke().  In the Excel demo, you can
see how I generate a Range object.  Once you have that, you'd use the
constants I mentioned to make calls (you could also wrap these calls to
invoke into your own routine that does some of the grunt work for you):

void = invoke( range, {Range_p_HorizontalAlignment}, {xlLeft}, {VT_I4},
DISPATCH_PROPERTYPUT)


> 
> 
> On Sun, 19 Dec 2004 05:42:50 -0800, Matt Lewis <guest at rapideuphoria.com>
> wrote:
> > 
> > posted by: Matt Lewis <matthewwalkerlewis at yahoo.com>
> > 
> > Tony Steward wrote:
> > >
> > > Great guys thanks for the help I know am able to export data to excel.
> > >
> > > How can I format an Excel cell using EUCOM?
> > > ie. Text alignment & orientation, Cell borders.
> > 
> > For text alignment, use Range.HorizontalAlignment and
> > Range.VerticalAlignment:
> > Range_p_HorizontalAlignment = 136,
> >     -- Property:  VT_VARIANT
> > 
> > Range_p_VerticalAlignment = 137,
> >     -- Property:  VT_VARIANT
> > 
> > For text orientation, use Range.Orientation:
> > 
> > Range_p_Orientation = 134,
> >     -- Property:  VT_VARIANT
> > 
> > For cell borders, it looks like you can use Range.BordersAround:
> > 
> > Range_m_BorderAround = 1067,
> >     -- Returns:  VT_VARIANT
> >     -- LineStyle VT_VARIANT [Optional][IN]
> >     -- Weight XlBorderWeight [Optional][IN]
> >     -- ColorIndex XlColorIndex [Optional][IN]
> >     -- Color VT_VARIANT [Optional][IN]
> > 
> > To get all the options, the easiest thing is to load up excel, open up
> > the VBA editor, hit F2 (object browser), select range, then BordersAround,
> > and hit F1.
> > 
> > Matt Lewis
> > 
> > 
> -- 
> Regards
> Tony Steward
> www.locksdownunder.com
> 
> IF IT IS TO BE IT IS UP TO ME!
> 
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu