Using Aspose Cells for Java, version 19.6.
Sample code:
Workbook workbook = new Workbook();
WorksheetCollection sheets = workbook.getWorksheets();
Worksheet sheet = sheets.get(0);
CommentCollection comments = sheet.getComments();
int index = comments.add(0, 0);
Comment comment = comments.get(index);
comment.setHtmlNote("a<font color='red'>b</font>\"c");
The last line throws the following exception:
Exception in thread "main" java.lang.NullPointerException
at com.aspose.cells.zhn.a(Unknown Source)
at com.aspose.cells.zhn.a(Unknown Source)
at com.aspose.cells.zhn.a(Unknown Source)
at com.aspose.cells.FontSettingCollection.setHtmlString(Unknown Source)
at com.aspose.cells.Comment.setHtmlNote(Unknown Source)
at <my code>
Please note that the same code works in Aspose Cells for Java 17.11.6, which is the version from which we upgraded our OEM Site license.
Kind regards,
Taras