首页 > 其他 > 详细

JXL获取excel批注

时间:2015-09-07 19:23:47      阅读:262      评论:0      收藏:0      [点我收藏+]
/**
 * Jxl.jar(2.6.12)
 * @author lmiky
 * @date 2011-11-26
 */
public class JxlTest {

    /**
     * 测试获取批注
     * @author lmiky
     * @date 2011-11-26
     * @param filePath
     * @throws IOException 
     * @throws BiffException 
     */
    public void getCommentTest(String filePath) throws BiffException, IOException {
        File file = new File(filePath);
        Workbook wb = Workbook.getWorkbook(file);
        Sheet[] sheets = wb.getSheets();
        Sheet sheet = sheets[0];
        Cell[] cells = sheet.getRow(0);
        Cell cell = cells[0];
        System.out.println("内容:" + cell.getContents());
        System.out.println("批注:" + cell.getCellFeatures().getComment());
    }
    
    
    public static void main(String[] args) throws BiffException, IOException {
        new JxlTest().getCommentTest("D:/测试.xls");
    }
}

 

JXL获取excel批注

原文:http://www.cnblogs.com/toSeeMyDream/p/4789643.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!