POi导入导出
文章平均质量分 88
userzyc
这个作者很懒,什么都没留下…
展开
-
通过反射进行excel导入数据,无论实体类属性多少都可使用
excel的导入 1.接收方法 @RequestMapping("imp") @ResponseBody public Result imp(MultipartFile file) throws IOException, InvalidFormatException, ParseException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { //接受file /*HSS原创 2020-11-18 17:07:19 · 302 阅读 · 0 评论 -
通过反射excel导出,无论属性到少都可以,导出名可自定义
本文章都是自创,如有类同纯属巧合,转发的朋友请写我的文章链接 1.先写一个跟导出excel对应的字段的list //list为头一个字母大写的属性名 private ArrayList<String> list = new ArrayList<String>(Arrays.asList( "Name","Sex","ShenGao","TiZhong","Dept" )); 2.导出的方法 @RequestMapping(value = "expor原创 2020-11-18 17:48:46 · 121 阅读 · 1 评论