in reply to Re: Need help converting Excel color scale conditional formatting macro to perl
in thread Need help converting Excel color scale conditional formatting macro to perl
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";Win32::OLE(0.1709) error 0x80020005: "Type mismatch" in PROPERTYPUT "Type" at OleExcelTipsTricks3.pl line 42.
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.
|
|---|