Link to home
Start Free TrialLog in
Avatar of s_w_e2
s_w_e2

asked on

How do I set conditional formatting in Excel from a Delphi program using OLE

I've used
oWB := oXL.Workbooks.add;
oSheet := oWB.activesheet;

This bit works and I can produce an excel sheet but can't get the conditional formatting to work

oSheet.Range['C7:C7'].FormatConditions.add(    ,      ,    ,    )

is the part where I am having trouble.  What do I enter to get a condition of greater than 1
ASKER CERTIFIED SOLUTION
Avatar of aflarin
aflarin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of s_w_e2
s_w_e2

ASKER

Thanks for the solution.  It was great.
Is there a place I can get the format for this - my original try had 4 parameters - yours had only 3  (I've figured that you need 4 if you use xlBetween  (I've got a list of numbers for these).

Can you also give me the format for validation of a cell?