摘要: var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Has 阅读全文
posted @ 2019-01-09 17:35 爱跳舞的程序员 阅读(308) 评论(0) 推荐(0) 编辑
摘要: <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+ 阅读全文
posted @ 2019-01-09 17:29 爱跳舞的程序员 阅读(524) 评论(0) 推荐(0) 编辑
摘要: try { InputStream iss = new FileInputStream("D:\\test.xlsx"); XSSFWorkbook wb = new XSSFWorkbook(iss); XSSFSheet sheet = wb.getSheetAt(0); /* // 创建新的E 阅读全文
posted @ 2019-01-09 17:22 爱跳舞的程序员 阅读(2226) 评论(0) 推荐(0) 编辑
摘要: import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFRow; impor 阅读全文
posted @ 2019-01-09 16:40 爱跳舞的程序员 阅读(505) 评论(0) 推荐(0) 编辑
摘要: /** * 导出excel * @param request * @param response * @return * @throws Exception */ @RequestMapping("exportExcel") @Action(description="导出excel") public 阅读全文
posted @ 2019-01-09 16:21 爱跳舞的程序员 阅读(6214) 评论(0) 推荐(0) 编辑
摘要: 第一步、设置excel模板路径(setSrcPath) 第二步、设置要生成excel文件路径(setDesPath) 第三步、设置模板中哪个Sheet列(setSheetName) 第四步、获取所读取excel模板的对象(getSheet) 第五步、设置数据(分为6种类型数据:setCellStrV 阅读全文
posted @ 2019-01-09 16:18 爱跳舞的程序员 阅读(670) 评论(0) 推荐(0) 编辑
摘要: 关于excel xls与xlsx的区别 xls是excel2003及以前版本生成的文件格式。xlsx是excel2007及以后版本生成的文件格式(excel 2007之后版本可以打开xls格式的文件)。 HSSF类,只支持2007以前的excel(文件扩展名为xls),而XSSH支持07以后的 @R 阅读全文
posted @ 2019-01-09 16:16 爱跳舞的程序员 阅读(546) 评论(0) 推荐(0) 编辑
摘要: package com.xxx.zjdlbb.service.zjdlbb; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOExceptio 阅读全文
posted @ 2018-12-25 19:04 爱跳舞的程序员 阅读(263) 评论(0) 推荐(0) 编辑
摘要: String webPath = request.getServletPath(); log.info(webPath); 输出: /zjdlbb/zjdlbb/zjdlbb/test.ht log.info(request.getServletContext().getRealPath("/")) 阅读全文
posted @ 2018-12-19 09:32 爱跳舞的程序员 阅读(965) 评论(0) 推荐(0) 编辑
摘要: var myDate = new Date(); myDate.getYear(); //获取当前年份(2位) myDate.getFullYear(); //获取完整的年份(4位,1970-????) myDate.getMonth(); //获取当前月份(0-11,0代表1月) myDate.g 阅读全文
posted @ 2018-12-13 17:11 爱跳舞的程序员 阅读(1373) 评论(0) 推荐(0) 编辑