1.导出:
response.setContentType("application/vnd.ms-excel; charset=utf-8");response.setHeader("Content-Disposition","attachment;filename=" + new String(execlName.getBytes("gb2312"), "ISO8859-1"));response.setCharacterEncoding("utf-8");OutputStream os=response.getOutputStream();//获得Execl表格HSSFWorkbook wb = doExport(datas,titles,sheetName);//写入流wb.write(os);os.flush();//关闭流os.close();String path = "C:/Users/chencq3/Desktop/billList.xls";FileOutputStream fileOut = new FileOutputStream(path); wb.write(fileOut); fileOut.close();