NPOI 1.2.4 忽略 IComment.Visible 值

发布于 2025-01-02 08:06:13 字数 499 浏览 4 评论 0原文

我试图在单元格上设置注释,但无论我是否设置 IComment.Visible = false,它始终可见。在 NPOI 1.2.3 中一切都按预期工作,但在 NPOI 1.2.4 中出现了此问题。下面是一个代码片段。谢谢。

   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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

国际总奸 2025-01-09 08:06:13

这是 NPOI 1.2.4 中的一个错误。 1.2.5 已经修复了

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文