简单jxl操作之jsp下载Excel

upload.jsp

response.setHeader("Content-Disposition", "attachment;filename=" + System.currentTimeMillis() + ".xls");
	   WritableWorkbook book=Workbook.createWorkbook(response.getOutputStream());
	   
	   /*WritableCellFormat format=new WritableCellFormat();
	   format.setBorder(Border.ALL,BorderLineStyle.THIN);
	   format.setBackground(Colour.GRAY_25);
	   format.setFont(new WritableFont(WritableFont.createFont("楷体"),14,WritableFont.NO_BOLD,false,UnderlineStyle.DOUBLE));
	   format.setWrap(true);*/
	   String[] title={"标题一","标题二","标题三"};
	   
	   WritableSheet sheet=book.createSheet("test",0);
       	   
	   for(int i=0;i


index.jsp




你可能感兴趣的:(web功能)