Re: EUCOM & Formatting Excel Cells
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Dec 19, 2004
- 422 views
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