Okay - why doesn't conditional formatting work? Are my
OLE statements correct - or is this more of an Excel
issue???

(Over here I am extracting some data from Lotus Notes
and dumping it into Excel --- all works fine except
for the conditional formatting)

use strict;
use Win32::OLE;
my $fp;
my $i;
my $dbDir;
my $Cell;
my $Notes = Win32::OLE->new('Notes.NotesSession')
    or die "Cannot start Lotus Notes Session
object.\n";
my $Excel =
Win32::OLE->GetActiveObject('Excel.Application')
    || Win32::OLE->new('Excel.Application');
$Excel->{Visible} = 1;    
my $Book = $Excel->Workbooks->New; 
my $Book = $Excel->Workbooks->Add;
my $Sheet = $Book->Worksheets(1);
my $Range = $Sheet->Range("A1:D1");
$Range->{Value} =
[['FileName','Title','Size','Quota']];
$i = 2;
$dbDir =
$Notes->GetDbDirectory("ABB_AE01_HUB01/AE01/ABB");
my $db1 = $dbDir->GetFirstDatabase(1247);
while ($db1) {
        $_ = $db1->{FilePath};
        #chomp $fp;
        if ( /^Mail/ ) {
                print "file path $_\n";
                $Range = $Sheet->Range("A$i:D$i");
                $Range->{Value} =
[[$db1->{FilePath},$db1->{Title},$db1->{Size},$db1->{SizeQuota}*1000]];
                $Range = $Sheet->Range("E$i");
                $Range->FormatConditions ->
Add("xlExpression",,"=(C$i/D$i)<1");
                $Range->FormatConditions(1)->Interior->{ColorIndex}
= 36;
                $i = $i+1;
        };
        $db1 = $dbDir->GetNextDatabase;

}


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to