With ExcelApp.Selection.Sort do 
begin
    Key1:=Range("B2");
    Order1:=xlAscending;
    Header:=xlYes;
    OrderCustom:=1;
    MatchCase:=False;
    Orientation:=xlTopToBottom;
    SortMethod:=xlPinYin
end;以上代码仅保证代码书写格式
---------------------

解决方案 »

  1.   

    SortMethod:=xlPinYin;
    ---------------------
      

  2.   

    sort是一个函数
    写法:
     ExcelApp.Selection.Sort(Key1:=ExcelApp.Selection.Range("B2"),  Order1:=xlAscending,Header:=xlYes, OrderCustom:=1,  MatchCase:=False,Orientation:=xlTopToBottom,SortMethod:=xlPinYin)
      

  3.   

    function  Sort(Key1: OleVariant; Order1: XlSortOrder; Key2: OleVariant; Type_: OleVariant; 
                       Order2: XlSortOrder; Key3: OleVariant; Order3: XlSortOrder; 
                       Header: XlYesNoGuess; OrderCustom: OleVariant; MatchCase: OleVariant; 
                       Orientation: XlSortOrientation; SortMethod: XlSortMethod; out RHS: OleVariant): HResult; stdcall;
    这是DELPHI原型