Java Excel API is an open source java library to read, write and modify Excel spread sheets.
This requires the library jxl-2.6.12.jar to be in classpath.
The following example shows how to add Cell comments in Excel Spread sheet.
WritableCellFeatures cellFeatures = new WritableCellFeatures();
cellFeatures.setComment("This is a test comment", 4, 2);
Label label = new Label(1, 2, "ABCD");
label.setCellFeatures(cellFeatures);
sheet.addCell(label);
cellFeatures = new WritableCellFeatures();
cellFeatures.setComment("Java Excel API - A Java API to read," +
" write and modify Excel spreadsheets", 3, 4);
label = new Label(1, 4, "XYZ");
label.setCellFeatures(cellFeatures);
sheet.addCell(label);
//Writes out the data held in this workbook in Excel format
workbook.write();
//Close and free allocated memory
workbook.close();
}