将excel数据导入excel模板

上传人:小** 文档编号:57331364 上传时间:2018-10-21 格式:DOCX 页数:7 大小:75.92KB
返回 下载 相关 举报
将excel数据导入excel模板_第1页
第1页 / 共7页
将excel数据导入excel模板_第2页
第2页 / 共7页
将excel数据导入excel模板_第3页
第3页 / 共7页
将excel数据导入excel模板_第4页
第4页 / 共7页
将excel数据导入excel模板_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《将excel数据导入excel模板》由会员分享,可在线阅读,更多相关《将excel数据导入excel模板(7页珍藏版)》请在金锄头文库上搜索。

1、0) fileName = fileName.substring(index + 1);String title = new SimpleDateFormat(“yyyyMMdd“).format(new Date()+ fileName;response.reset();response.setCharacterEncoding(“utf-8“);response.setContentType(“application/download“);response.setHeader(“Content-Disposition“, “attachment; filename=“+ new Strin

2、g(title.getBytes(“utf-8“), “iso8859-1“);/设置文件名显示中文String startDate = request.getParameter(“startDate“);String endDate = request.getParameter(“endDate“);String meterIds = request.getParameter(“meterIds“);String pageSize = request.getParameter(“pageSize“);String currentPage = request.getParameter(“cur

3、rentPage“);String statistics = request.getParameter(“statistics“);String exportWay = request.getParameter(“exportWay“);Map map = new HashMap();map.put(“startDate“, startDate);map.put(“endDate“, endDate);map.put(“meterIds“, meterIds);map.put(“currentPage“, currentPage);map.put(“pageSize“, pageSize);i

4、f (“all“.equals(exportWay) map.put(“queryAll“, “queryAll“);/选择查询全部map.put(“statistics“, statistics);ITSBalanceService tsbalanceService = (ITSBalanceService) InitApp.context.getBean(“tsbalanceService“);Map data = tsbalanceService.showTSBalance(map);List projectNodeList = (List) data.get(“tsbalanceLis

5、t“);String path = request.getRealPath(“/excelTemplate“).replace(“,“/“);String filePath = path + “/“ + fileName;File file = new File(filePath);InputStream is = null;try is = new FileInputStream(file);Workbook wb = new HSSFWorkbook(is);int sheetsNum = wb.getNumberOfSheets();/找到对应的 sheetfor (int i = 0; i

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 管理学资料

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号