From C# to Excel - ConditionalFormat -


i have 2 cell created in c# by

worksheet.cell("a1"); worksheet.cell("b1"); 

i adding conditional format both of these cells below:

first case:

worksheet.cell("a1").addconditionalformat().iconset(xliconsetstyle.threetrafficlights2)                     .addvalue(xlcficonsetoperator.equalorgreaterthan, 0, xlcfcontenttype.number)                     .addvalue(xlcficonsetoperator.equalorgreaterthan, 20, xlcfcontenttype.number)                     .addvalue(xlcficonsetoperator.equalorgreaterthan, 40, xlcfcontenttype.number); 

second case

worksheet.cell("b1").addconditionalformat().iconset(xliconsetstyle.threesigns)                    .addvalue(xlcficonsetoperator.equalorgreaterthan, 0, xlcfcontenttype.number)                    .addvalue(xlcficonsetoperator.equalorgreaterthan, 75, xlcfcontenttype.number)                    .addvalue(xlcficonsetoperator.equalorgreaterthan, 95, xlcfcontenttype.number); 

the problem xlcficonsetoperator has properies equal , equalorgreaterthan.

it first case want "better" sign lower values e.g:

0-19 - green 20-39 - yellow 40 +  -  red 

in second case want revert :

0-19 - red 20-39 - yellow 40 +  -  red 

in above second case working without problem. how can solve in first case if there not less/equalorless property?

use

....addconditionalformat().iconset(xliconsetstyle.threetrafficlights2, true).... 

the second parameter bool reverseiconorder.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -