excel sorting

excel sorting

Post by wilso » Fri, 01 Aug 2003 16:17:54



hi...

This is the part of the macro which I need to implement in Delphi.

Selection.Sort Key1:=Range("B2"), Order1:=xlAscending,
Key2:=Range("A2") _
, Order2:=xlAscending, Key3:=Range("C2"),
Order3:=xlAscending,
Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom

I've create an OleObject and trying to add a sort feature in the
How would I write the code to do this sorting?

I tried this code but it gives a formula error.

ExcelApp.ActiveSheet.Range['a1','p822'].Sort('B2',xlAscending,'A2',EmptyPara
m,xlAscending,'C2',xlAscending,xlGuess,1,False,xlTopToBottom);
 
 
 

excel sorting

Post by Dhaval Sha » Sat, 02 Aug 2003 08:47:55

HI Wilson,
try newsgroup oleautomation
Deborah and others are great with this and you'd surely find a lot of
useful stuff in there just by browsing..
cheers

Dhaval Shah
Sr. Software Developer
Perth, Australia

 
 
 

excel sorting

Post by Wilso » Wed, 06 Aug 2003 09:50:41


Hi,
can somebody give me a responce? oleautomation newsgroup hasn't given me any help on my problem. browsing through all its posts also don't find anything that i need.
thanks.
 
 
 

excel sorting

Post by Ignacio Va » Wed, 06 Aug 2003 10:17:08


any help on my problem.

Well, regardless of that it's still the best place to find/get an answer. In
the meantime you might want to check the VBA documentation that comes with
MS Office.

Cheers,
Ignacio
 
 
 

excel sorting

Post by Dhaval Sha » Thu, 07 Aug 2003 15:32:41

Hi Wilson,
look into oleautomation newsgroup if you haven't lately.
Deborah has replied to your query.
Have a look at her website. it's great for oleautomations
http://www.yqcomputer.com/

cheers

Dhaval Shah
Sr. Software Developer
Perth, Australia