The below code works fine for HSSFWorkbook but it gives me an error when using for XSSFWorkbook.
Exception in
thread "main" java.lang.NoSuchMethodError: schemasMicrosoftComVml.CTShape.getClientDataList()Ljava/util/List;
at org.apache.poi.xssf.usermodel.XSSFComment.setColumn(XSSFComment.java:127)
at org.apache.poi.xssf.usermodel.XSSFDrawing.createCellComment(XSSFDrawing.java:302)
at org.apache.poi.xssf.usermodel.XSSFDrawing.createCellComment(XSSFDrawing.java:50)
The error is thrown for the line Comment comment = drawing.createCellComment(anchor);
Any help appreciated. Thanks in advance.