本文实例讲述了java简单解析xls文件的方法。分享给大家供大家参考,具体如下:
读取:
import java.io.*; import jxl.*; import jxl.write.*; import jxl.format.*; class Aa{ public static void main(String args[]) { try{ Workbook workbook = null; try { workbook = Workbook.getWorkbook(new File("d:\\a.xls")); } catch (Exception e) { throw new Exception("file to import not found!"); } Sheet sheet = workbook.getSheet(0); Cell cell = null; int columnCount=3; int rowCount=sheet.getRows(); for (int i = 0; i
网页标题:java简单解析xls文件的方法示例【读取和写入】-创新互联
网站URL:http://csruizhi.cn/article/dhiooj.html