一段破代码老忘。。。
protected void downloadPaginExcel(HttpServletRequest request, HttpServletResponse response,Pagin pagin,String fileName) throws Exception{ String columnObject = getParameter("columnObject");//字段对应关系 JSONArray myJsonArray =JSONArray.parseArray(columnObject); HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("工作表1"); sheet.setDefaultColumnWidth(18); sheet.setDefaultRowHeightInPoints(20); HSSFRow row = sheet.createRow((int) 0); for(int i=0;inewMap=ConvertObjToMap(pagin.getResultList().get(i)); row = sheet.createRow((int) i + 1); for(int j=0;j