I used this code and it's doesn't work and I do have Sheet1 in my
workbook.
$CurrentSheet = $Workbook->Worksheets("Sheet1");
$RangeA = $CurrentSheet->Range("A1");
$RangeB = $CurrentSheet->Range("A20");
$Excel->Selection->Sort({
Key1 => $RangeA,
Order1 => xlDescending,
Key2 => $RangeB
});
I also want to freeze row 2 but this doesn't work as well.
$Excel->Rows("2")->Select; or $Excel->Rows("2:2")->Select;
$Excel->ActiveWindow->{FreezePanes} = "True";
Any help? thanks a lot