in reply to Re: Win32::OLE Excel question
in thread Win32::OLE Excel question

I am having similar problems with sort, can you please post some example..? here is my code ================== use OLE; $xlfile = "F:\\PVCS_Checkin\\sava\\New.xls"; # Create OLE object - Excel Application Pointer $xl_app = CreateObject OLE 'Excel.Application' || die $!; $xl_app->{'Visible'} = 1; $workbook = $xl_app->Workbooks->Open($xlfile); $Sheet = $workbook->Worksheets(1); $Range_new1 = $Sheet->Range("A:B"); $Range_new2 = $Sheet->Range("B6"); $Sheet->Range('A2:B6')->Select(); $xl_app->Selection->Sort({Key1 => $Range_new1, Order1 => xlAscending, Key2 => $Range_new2, Header=>xlYes, OrderCustom=>1, MatchCase => False, DataOption1 => xlSortNormal}); $xl_app->ActiveWorkbook->Close(0); $xl_app->Quit(); ===================