BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Excel Sorting

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Uncle Potato
Guest





PostPosted: Mon Aug 08, 2005 2:59 am    Post subject: Excel Sorting Reply with quote



I got this example from the net, but I am not sure what columns it is
sorting.
Can someone give some hint?

Excel.Range['A7', 'Q5800'].Sort(
Excel.Cells.Item[2, 2], xlAscending,
Excel.Cells.Item[2, 3], EmptyParam, xlDescending,
EmptyParam, xlAscending, xlYes, EmptyParam,
True, xlTopToBottom, xlSyllabary, EmptyParam,
EmptyParam, EmptyParam);

I am trying to sort rows 7 .. 5800 with column G
So I try to replace the Cells.ITem[2,2] with [8,1] and it doesn't seem
to perform what I wanted.
What is the Excel.Cells.Item[arow,acolumn] suppose to point to ?
I only expect giving a column num instead of a cell ?
Or is 2,2 is a series of columns? (guess not)
How about the 2,3 that follows ? I guess the line that contains 2,3
is a second column to sort, but i tried removing the whole line (if I
only need to sort by a single column) But excel doesn't like it.

Thanks


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.