First post here, let me know if I should be doing anything differently. Have had some success first getting into Excel/OLE and have learned through this site how to use macros to determine what tags to use. Thanks! One of the tags for setting vertical and horizontal alignment (to center text) does not appear to be having any effect despite all of the permutations I've tried. In some guides online I've seen examples like:
$sheet -> Range("G7:H7") -> {HorizontalAlignment} = xlHAlignCenter; + # Center text;
However by making/editing a macro after manually centering the text I see the equivalent of the following:
$sheet -> Range("F1:S1") -> {HorizontalAlignment} = "xlCenter"; $sheet -> Range("F1:S1") -> {VerticalAlignment} = "xlCenter";
Both seem to be recognized tags and don't toss errors, but none actually modify the format of those cells. They remain the default xlGeneral, xlBottom after the code runs. Here is the macro output I'm looking at pushing into OLE code.
Range("A1:S1").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlCenter .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = True End With
In reply to Another Excel/OLE question. by Morellio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |