Search code examples
c#npoi

NPOI 1.2.4 ignores IComment.Visible value


I am trying to set a comment on a cell, but it is always visible no matter if I set IComment.Visible = false. In NPOI 1.2.3 everything worked as expected but in NPOI 1.2.4 this issue occured. Here's a code snippet below. Thanks.

   IComment cellComment = patriarch1.CreateCellComment(new HSSFClientAnchor(0, 0, 0, 0, 4, 2, 14, 5)); 
   HSSFRichTextString richText = new HSSFRichTextString("Some notes on the cell...");
   richText.ApplyFont(commentFont); 
   cellComment.String = richText; 
   cell.CellComment = cellComment;
   cellComment.Visible = false;   // ignored

Solution

  • It's a bug in NPOI 1.2.4. It's already fixed in 1.2.5