HSSFDataFormatter hdf = new HSSFDataFormatter();System.out.println (hdf.formatCellValue(mycell));
将返回“ 90%”
此方法的API位于http://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/DataFormatter.html#formatCellValue%28org.apache.poi.ss.usermodel.Cell%29
即使使用HSSFCell,也可以直接使用
即使我的手机是HSSFCell,它也对我有用
我也尝试过这个演员-可行。
HSSFCell cell1 = (HSSFCell) row1.getCell(2);HSSFDataFormatter hdf = new HSSFDataFormatter();System.out.println ("formatted "+ hdf.formatCellValue(cell1));
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)