Skip to main content

[Migrated content. Thread originally posted on 10 June 2004]

Hello. Somebody could say to me like drawing edges in cells of excel by means of object OLE

Thanks

[Migrated content. Thread originally posted on 10 June 2004]

Hello. Somebody could say to me like drawing edges in cells of excel by means of object OLE

Thanks
If you check he CELL object, I am sure it has some means to do this, if you cannot find something obvious, see if you can find some example code in java, vb, delphi or vc that does it, and we can help you translate.

[Migrated content. Thread originally posted on 10 June 2004]

Hello. Somebody could say to me like drawing edges in cells of excel by means of object OLE

Thanks
Jaifi,
A good place to generate vb code and analyze it is by turning on the macro recorder in excel while you apply cell formatting manually. This will record the commands in a vb macro file that you can view.
Here's an acucobol code snippet for applying a few styles(like a border) to a cell:


      * Make cell green with a boxed border and currency format
           INQUIRE EX-WORKSHEET @Range("B9") IN EX-RANGE.
           MODIFY EX-RANGE @Font::ColorIndex = 10.
           MODIFY EX-RANGE @BorderAround(@xlContinuous, @xlMedium,
               @xlColorIndexAutomatic).
           MODIFY EX-RANGE @Style = "Currency".
           MODIFY EX-RANGE @NumberFormat =
               "_($* #,##0_);_($* (#,##0);_($* ""-""_);_(@_)".
           DESTROY EX-RANGE.


The full acucobol Excel sample on this forum can be found here: excel sample

[Migrated content. Thread originally posted on 10 June 2004]

Hello. Somebody could say to me like drawing edges in cells of excel by means of object OLE

Thanks
Jaifi,
A good place to generate vb code and analyze it is by turning on the macro recorder in excel while you apply cell formatting manually. This will record the commands in a vb macro file that you can view.
Here's an acucobol code snippet for applying a few styles(like a border) to a cell:


      * Make cell green with a boxed border and currency format
           INQUIRE EX-WORKSHEET @Range("B9") IN EX-RANGE.
           MODIFY EX-RANGE @Font::ColorIndex = 10.
           MODIFY EX-RANGE @BorderAround(@xlContinuous, @xlMedium,
               @xlColorIndexAutomatic).
           MODIFY EX-RANGE @Style = "Currency".
           MODIFY EX-RANGE @NumberFormat =
               "_($* #,##0_);_($* (#,##0);_($* ""-""_);_(@_)".
           DESTROY EX-RANGE.


The full acucobol Excel sample on this forum can be found here: excel sample

[Migrated content. Thread originally posted on 10 June 2004]

Hello. Somebody could say to me like drawing edges in cells of excel by means of object OLE

Thanks
Jaifi,
A good place to generate vb code and analyze it is by turning on the macro recorder in excel while you apply cell formatting manually. This will record the commands in a vb macro file that you can view.
Here's an acucobol code snippet for applying a few styles(like a border) to a cell:


      * Make cell green with a boxed border and currency format
           INQUIRE EX-WORKSHEET @Range("B9") IN EX-RANGE.
           MODIFY EX-RANGE @Font::ColorIndex = 10.
           MODIFY EX-RANGE @BorderAround(@xlContinuous, @xlMedium,
               @xlColorIndexAutomatic).
           MODIFY EX-RANGE @Style = "Currency".
           MODIFY EX-RANGE @NumberFormat =
               "_($* #,##0_);_($* (#,##0);_($* ""-""_);_(@_)".
           DESTROY EX-RANGE.


The full acucobol Excel sample on this forum can be found here: excel sample

[Migrated content. Thread originally posted on 10 June 2004]

Hello. Somebody could say to me like drawing edges in cells of excel by means of object OLE

Thanks
Thanks for the good work Dan!