Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

Commented Issue: Problem in NPOI 2.0.1: Conditional Formatting Error [11671]

$
0
0
Dear all,

HSSFWorkBook is ok.
HSSFWorkbook hssfworkbook = new HSSFWorkbook();
ISheet sheet = hssfworkbook.CreateSheet();
ISheetConditionalFormatting hscf = sheet.SheetConditionalFormatting;
IConditionalFormattingRule rule = hscf.CreateConditionalFormattingRule("$A2=3");
IConditionalFormattingRule[] rules = { rule };
IPatternFormatting patternFmt = rule.CreatePatternFormatting();

But XSSFWorkBook will catch exception when run -- rule.CreatePatternFormatting();
XSSFWorkbook hssfworkbook = new XSSFWorkbook();
ISheet sheet = hssfworkbook.CreateSheet();
ISheetConditionalFormatting hscf = sheet.SheetConditionalFormatting;
IConditionalFormattingRule rule = hscf.CreateConditionalFormattingRule("$A2=3");
IConditionalFormattingRule[] rules = { rule };
IPatternFormatting patternFmt = rule.CreatePatternFormatting();

And if I change
hscf.CreateConditionalFormattingRule("$A2=3");
to
hscf.CreateConditionalFormattingRule(ComparisonOperator.NO_COMPARISON, "$A2=3");
Will catch Exception: Unknown comparison operator: NO_COMPARISON

Please guide me to resolve the issue.

Thank you in advance.
Comments: ** Comment from web user: shabs39 **

I am having the same issue


Viewing all articles
Browse latest Browse all 1621

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>