If you have a Cells with comments and you want to shift them up or down, the Cell Values will be shift, but not the Comments: POIFSFileSystem fileSystem = new POIFSFileSystem(new FileInputStream("comments.xls")); HSSFWorkbook workbook = new HSSFWorkbook(fileSystem); HSSFSheet sheet = workbook.getSheet("Sheet1"); sheet.shiftRows(1, sheet.getLastRowNum(), 1, true, true); workbook.write(new FileOutputStream("comments-error.xls")); In this Example the Comment in comments.xls is in the same row as in comments-error.xls but it must be at row+1
Created attachment 21267 [details] Example source
Created attachment 21268 [details] Example output
I use version: poi-3.0.2-beta1-20071204.jar
Created attachment 21352 [details] Patch for the shifting comment problem After applying the enclosed fix comment are correctly shifted.
Thanks for that patch, applied