Sorry forgot to change the label
I am tring to align the test in the cell but it no workie and it is
driving me nuts
$RangeValue = J1;
$Alignment = xlCenter;
$Working_Alignment = $Book-Worksheets($SHEET_NAME);
$Working_Alignment
-Range($RangeValue)-{HorizontalAlignment} = $Alignment;
Almost, try this:
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Excel';
my $Excel = Win32::OLE-GetActiveObject('Excel.Application') ||
Win32::OLE-new('Excel.Application');
$Excel-{'Visible'} = 1;#0 is hidden, 1 is visible
$Excel-{DisplayAlerts}=0;#0 is hide alerts
# Open new Worksheet
$Excel-{SheetsInNewWorkBook} = 1;
my $Book = $Excel-Workbooks-Add();
my $Sheet = $Book-Worksheets(1);
$Sheet-Activate();
my $range = 'A1';
$Sheet-Range($range)-{Value} = 'abc';
$Sheet-Range($range)-Interior-{ColorIndex} = 27;
$Sheet-Range($range)-Font-{FontStyle}=Bold;
$Sheet-Range($range)-{HorizontalAlignment} = xlHAlignCenter;
$Sheet-Range($range)-Font-{Underline} = xlUnderlineStyleSingle;
# or
$Sheet-Range($range)-Font-{Underline} = 2;
sleep(5)
--
Nathaniel G. Bartusiak
TTMS, Keesler AFB
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs