81,091
社区成员
发帖
与我相关
我的任务
分享
/**
* 导出地化录井数据表
* @author Guowei
*/
public void ExpDhljsjb(){
OutputStream os = null;
String fileName = null;
String s = "application/octet-stream";
try {
os = getResponse().getOutputStream();
getResponse().setContentType(s);
fileName = URLEncoder.encode(""+getJhByJhdm(getBoJhdm())+"井地化录井数据表.xls", "UTF-8");
// 设置文件下载头
getResponse().addHeader("Content-Disposition", "attachment;filename="
+ fileName);
DhljsjbService dservice = new DhljsjbService();
//getWebRootPath()获取相对路径根目录
//getPathSpace()获取系统间隔符
dservice.ExpDhljsjb(getJhByJhdm(getBoJhdm()),getBoJhdm(),getWebRootPath(),getPathSpace(), os);
os.close();
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}