Re: Delphi 5 excel automation problem




jp wrote:
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
{snip}
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

I once did something like this.... I havent used Excel for years.

ExcelApplication.Range[].Select;
ExcelApplication.Selection.Sort;
or
ExcelApplication.Selection.Sort(style=xlDescending);

This is just off my head, but using the Selection property you can
probably do what you want.
Take a close look at this

HTH
Sonnich

.


Quantcast