Comment font

Why can’t I access to font style of comment in this code example:
comment = (Comment) object;

font = comment.getFont();
_logger.info("Font bold " + font.isBold());
_logger.info("Font italic " + font.isItalic());
_logger.info("Font underline " + font.getUnderline());

I get false even if text in comment is bold or italic.

Hi,

Thanks for considering Aspose.

Do you access the comment in the designer template file to check its font attributes or you are creating comments at runtime and later accesses them? Well, related creating and accessing comments at runtime, there should be no problem at all. And if you are accessing designer comments in the template excel file, we have to check and figure out to get back to you soon.

Thank you.

I’m creating workbook from existing file on HDD, and accessing comment from that workbook.

Hi,

Please try this fix.We have support to get the font of the comment in the template file.

Now we only support the simple font setting not support rich text formatting. So if the comment text is rich text formatted , getFont() will not return the true font.