Just another Perl shrine | |
PerlMonks |
Re^2: Need help converting Excel color scale conditional formatting macro to perlby WheelbarrowRacers (Initiate) |
on Feb 20, 2015 at 00:51 UTC ( [id://1117290]=note: print w/replies, xml ) | Need Help?? |
Poj, I did have to make a couple of changes for the example you so wonderfully provided to work on my machine.
For the lines setting the Type, like this one: $csc->{1}->{'Type'} = xlConditionValueLowestValue; I needed to put quotes around the value like this: $csc->{1}->{'Type'} = 'xlConditionValueLowestValue'; When I used this line to start Excel: my $excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); I got this error: However, no other code changes were needed if I launched Excel this way: my $excel = CreateObject OLE "Excel.Application"; No clue yet, why the difference in launching Excel mattered in my case, but just wanted to share that in case it matters for someone else.
In Section
Seekers of Perl Wisdom
|
|