| | |
| | | */ |
| | | |
| | | public class ExcelUtil { |
| | | private static WritableFont arial14font = null; |
| | | |
| | | private static WritableCellFormat arial14format = null; |
| | | private static WritableFont arial10font = null; |
| | | private static WritableCellFormat arial10format = null; |
| | | private static WritableFont arial12font = null; |
| | | private static WritableCellFormat arial12format = null; |
| | | private final static String UTF8_ENCODING = "UTF-8"; |
| | | |
| | | public static String outPath = MyFileUtil.getSDPath() + "/" + "农业水价记录"; |
| | | public static String outRechargePathName = "水价充值记录.xls"; |
| | | public static String outUserPathName = "水价开户记录.xls"; |
| | | public static String outPath = MyFileUtil.getSDPath() + "/" + "大禹节水充值机记录"; |
| | | public static String outRechargePathName = "充值记录.xls"; |
| | | public static String outUserPathName = "开户记录.xls"; |
| | | |
| | | /** |
| | | * 单元格的格式设置 字体大小 颜色 对齐方式、背景颜色等... |
| | | */ |
| | | private static void format() { |
| | | try { |
| | | arial14font = new WritableFont(WritableFont.ARIAL, 14, WritableFont.BOLD); |
| | | WritableFont arial14font = new WritableFont(WritableFont.ARIAL, 14, WritableFont.BOLD); |
| | | arial14font.setColour(jxl.format.Colour.LIGHT_BLUE); |
| | | arial14format = new WritableCellFormat(arial14font); |
| | | arial14format.setAlignment(jxl.format.Alignment.CENTRE); |
| | | arial14format.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); |
| | | arial14format.setBackground(jxl.format.Colour.VERY_LIGHT_YELLOW); |
| | | |
| | | arial10font = new WritableFont(WritableFont.ARIAL, 10, WritableFont.BOLD); |
| | | WritableFont arial10font = new WritableFont(WritableFont.ARIAL, 10, WritableFont.BOLD); |
| | | arial10format = new WritableCellFormat(arial10font); |
| | | arial10format.setAlignment(jxl.format.Alignment.CENTRE); |
| | | arial10format.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN); |
| | |
| | | RechargeBean projectBean = (RechargeBean) objList.get(j); |
| | | list.add(projectBean.getSerial()); |
| | | list.add(projectBean.getUserName()); |
| | | list.add(projectBean.getUserId()); |
| | | list.add(projectBean.getOrderID()); |
| | | list.add(DateUtil.dateToStamp(projectBean.getDate(), DateUtil.type2)); |
| | | list.add(projectBean.getMorny()); |
| | | list.add(projectBean.getBalance()); |