Jfinal之 poi render

[代码] [Java]代码 import java.io.IOException;


import org.apache.poi.hssf.usermodel.HSSFWorkbook;




public class PoiRender extends Render {

	private HSSFWorkbook wb;
	private String name;
	public  Exc http://www.goodk123.info/linked/20130227.do; elRender(HSSFWorkbook wb, String name){
		this.wb = wb;
		this.name = name;
	
		
	}

	public void render() {
		response.addHeader("Content-disposition", "attachment; filename="   name);
		response.setContentType("application/x-msdownload");
		
		try {
			wb.write(response.getOutputStream());
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
} http://sw.aaafaipiao.com/linked/20130227.do;

你可能感兴趣的:(Jfinal之 poi render)