Delphi 5 excel automation problem



Im using D5 and automating with excel. Having problems applying a sort
on a range of data in a spread***. From my delphi code the following
piece of code gives a exception.

Work***.Range[startpoint,endpoint].Sort('D8',
xlAscending, //2
EmptyParam, //3
EmptyParam, //4
EmptyParam, //5
EmptyParam, //6
EmptyParam, //7
xlGuess, //8
xlSortRows, //9
xlStroke, //10
xlAscending, //11
EmptyParam, //12
EmptyParam, //13
EmptyParam, //14
EmptyParam); //15

startpoint and endpoint encapsulate the whole data range. D8 is the
column of which to reorder the data elements.
any help would be gratefully appreciated
thank you
jp ...

.


Quantcast