void toInExcel(@RequestParam("file") MultipartFile file) throws Exception{
//String filepath = "D:/cData07.xlsx";
//InputStream is = new FileInputStream(filepath);
InputStream is = file.getInputStream();
//获取文件后缀(2003)xls|(2007)xlsx
String fileName = file.getOriginalFilename();
String suffix = fileName.substring(fileName.lastIndexOf("."));
//2003版本
//Workbook workbook = new HSSFWorkbook(is);
//2007版本
//Workbook workb
Poi-读取Excel2003/Excel2007及兼容性问题
最新推荐文章于 2021-02-13 19:15:23 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)