>Hi all,
> I use vb.net and generate the excel. Import Microsoft Excel9.0 Object Library.
> I already go to excel marco to sort the data,and copy this code. After i go to vb.net paste it but error.
>Code in the below,error is xlAscending,xlGuess, xlTopToBottom no declared ...
>Anyone can give some idea with me, Thank you ...
>
>
>XL.Selection.Sort(Key1:=Sheet.Range("A" + startPoint), Order1:=xlAscending, Header:=xlGuess, _
> OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom)
>
>
>
For excel constants see
http://msdn.microsoft.com/en-us/library/aa221100(v=office.11).aspx
Gregory