`
hxdawxyhxdawxy
  • 浏览: 125947 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

poi导出excel

 
阅读更多
static public void main(String[] args) throws Exception {
		FileOutputStream fos = new FileOutputStream("C:/_WORK/tt.xls");
		HSSFWorkbook wb = new HSSFWorkbook();
		HSSFSheet s = wb.createSheet();
		wb.setSheetName(0, "first sheet");
		HSSFRow row = s.createRow(0);
		HSSFCell cell = row.createCell(0);
		cell.setCellValue("Hello! This message is generated from POI.");
		wb.write(fos);
		fos.close();
	}
 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics