java 导出excel

摘要: 1)jsp:form:<form id="excelForm" action="${path }/jsp/excel.jsp" method="post"><input type="hidden" name="title" value="月度风险监测指标监测结果汇总表——日常监控类指标" /><textarea id="excelInput" name="excel" rows="10" 阅读全文
posted @ 2012-02-28 17:16 square198901 阅读(607) 评论(0) 推荐(0)

java数据中 数据合并工具类

摘要: public class VerticalMerger {public static List<Map<String, Object>> transform(LinkedList<String> keyList, List<Map<String, Object>> mapList) {List<Map<String, Object>> newMapList = new LinkedList<Map<String, Object>>();Map<String, Object> 阅读全文
posted @ 2012-02-28 16:46 square198901 阅读(551) 评论(0) 推荐(0)

jsva中 数据库行转列 合并数据 在jsp展示

摘要: 1)jsp<!-- 数据展示 --><c:set var="i" value="1" /><c:forEach var="bean" items="${beanList}"><c:forEach var="bean1" items="${bean.children}" varStatus="s1"><c:forEach var="bean2" items="${bean1. 阅读全文
posted @ 2012-02-28 16:44 square198901 阅读(699) 评论(0) 推荐(0)

jsp 正则表达式实现 文字居左,数字居右

摘要: var reg = /^\-?[\d|,]*\.?\d*%?$/;$('#dataTable td').each(function() {var str = $(this).text();str = str.replace(/(^\s*)|(\s*$)/g, '');if ('' == str) {$(this).text('--').attr('align', 'right');} else if ('%' == str) {$(this).text('--').a 阅读全文
posted @ 2012-02-28 16:26 square198901 阅读(675) 评论(0) 推荐(0)

util工具类 读取excel

摘要: //读取Excel的类 import java.io.*;import jxl.*;public class ReadXLS {public static void main(String args[]) {try {Workbook book = Workbook.getWorkbook(new File("测试.xls"));// 获得第一个工作表对象Sheet sheet = book.getSheet(0);// 得到第一列第一行的单元格Cell cell1 = sheet.getCell(0, 0);String result = cell1.getContent 阅读全文
posted @ 2012-02-28 09:38 square198901 阅读(207) 评论(0) 推荐(0)