in reply to Re^2: Sorting spread sheets in Perl via OLE Excel
in thread Sorting spread sheets in Perl via OLE Excel

Can you sort the data with Perl before writing to the spreadsheet?


The way forward always starts with a minimal test.
  • Comment on Re^3: Sorting spread sheets in Perl via OLE Excel

Replies are listed 'Best First'.
Re^4: Sorting spread sheets in Perl via OLE Excel
by Anonymous Monk on Oct 18, 2017 at 12:40 UTC
    nope,

    My spreadsheet is built with others spreadsheets, some data can be identical in those spreadsheet, so i have to write identical data once.

    I guess it would make the algorithm very slow and complicated if i had to sort datas before writing in the spreadsheet.

    But anyway, I found my answer some minutes after I asked for help. Here's the answer if some people need it ;) :

    my $SortOrd1 = $Sheet->Range("A2"); my $SortOrd2 = $Sheet->Range("B2"); my $SortOrd3 = $Sheet->Range("C2"); my $Selection = $Sheet->Range("A:M"); $Selection->Sort( {Key1 => $SortOrd1, Order1 => xlAscending, Key2 => $SortOrd2, Order2 => xlAscending, Key3 => $SortOrd3, Order3 => xlAscending, });