pom.xml
java
package com.example.demo; import com.alibaba.fastjson.JSONObject; import com.example.demo.pojo.People; import org.jxls.reader.ReaderBuilder; import org.jxls.reader.XLSReadStatus; import org.jxls.reader.XLSReader; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import java.io.BufferedInputStream; import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.*; @RestController public class TestImport { private final Logger log = LoggerFactory.getLogger(this.getClass()); //解析Excel日期格式 public static String ExcelDoubleToDate(String strDate) { if(strDate.length() == 5){ try { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Date tDate = DoubleToDate(Double.parseDouble(