
读取注解代码如下:
Comment comment = sheet.getRow(7).getCell(5, Row.CREATE_NULL_AS_BLANK).getCellComment()
根据批注定位单元格做不到。。。
HSSFWorkbook wb = nullPOIFSFileSystem fs = null
try {
fs = new POIFSFileSystem(new FileInputStream("e:\\workbook.xls"))
wb = new HSSFWorkbook(fs)
} catch (IOException e) {
e.printStackTrace()
}
HSSFSheet sheet = wb.getSheetAt(0)
HSSFRow row = sheet.getRow(0)
HSSFCell cell = row.getCell(0)
String msg = cell.getStringCellValue()
System.out.println(msg)
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)