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

前端之家收集整理的这篇文章主要介绍了perl使用Spreadsheet::SimpleExcel实现降序升序排列顺序前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
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','DESC');


sort_data

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

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

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

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

猜你在找的Perl相关文章