perl使用Spreadsheet::SimpleExcel实现降序升序排列顺序

马弘和
2023-12-01
http://search.cpan.org/~reneeb/Spreadsheet-SimpleExcel-1.9/lib/Spreadsheet/SimpleExcel.pm#set_headers
$excel->sort_data('Name of Worksheet',1,'ASC');

$excel->sort_data('Name of Worksheet',0,'DESC');


sort_data

# sort data of worksheet - ASC or DESC
  $excel->sort_data('Name of Worksheet',0,'DESC');

sort_data sorts the rows. All sorts for one worksheet are combined, so

$excel->sort_data('Name of Worksheet',0,'DESC');
  $excel->sort_data('Name of Worksheet',1,'ASC');

will sort the column 0 first and then (within this sorted data) the column 1.


 类似资料: