日期:2014-5-16 浏览次数:20217次

Apache POI —— HSSF / XSSF(1)

新建工作薄(NewWorkbook)

?

Workbook wb =new?HSSFWorkbook();

FileOutputStream fileOut =new?FileOutputStream("workbook.xls");

wb.write(fileOut);

fileOut.close();

?

Workbook wb =new?XSSFWorkbook();

FileOutputStream fileOut =new?FileOutputStream("workbook.xlsx");

wb.write(fileOut);

fileOut.close();

?

新建工作表(New Sheet)

友情链接: 爱易网
Copyright © 2013-2018 爱易网页 版权所有 粤ICP备18100884号-2