欢迎访问悦橙教程(wld5.com),关注java教程。悦橙教程  java问答|  每日更新
页面导航 : > > 文章正文

使用 POI 读入 Excel 文件并写到另外一个 Excel 文件,poiexcel,InputStream

来源: javaer 分享于  点击 6291 次 点评:200

使用 POI 读入 Excel 文件并写到另外一个 Excel 文件,poiexcel,InputStream


InputStream inputStream = getClass().getClassLoader().    getResourceAsStream("templates/template_report.xls");POIFSFileSystem fileSystem = new POIFSFileSystem(inputStream);HSSFWorkbook workBook = new HSSFWorkbook(fileSystem);FileOutputStream out = new FileOutputStream("workbook.xls");workBook.write(out);out.close();inputStream.close();//该片段来自于http://byrx.net
相关栏目:

用户点评