导出excel文件注意的问题

File file = new File("data/userExpand" + new String(userName.getBytes(), "utf-8") +
                "-" + DateUtils.dateToStr("yyyy-MM-dd_HH_mm_ss", new Date()) + ".xlsx");

第一:要指定标题的格式,不然会出现乱码。
第二:File不能识别:、空格等支付!不然会报错

发布了33 篇原创文章 · 获赞 0 · 访问量 1439

猜你喜欢

转载自blog.csdn.net/m0_46086429/article/details/104481340