关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、418799587 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 5113|回复: 3

Excel导出错误

[复制链接]
发表于 2017-12-19 11:01:29 | 显示全部楼层 |阅读模式
本帖最后由 rockysy 于 2017-12-20 09:02 编辑

[2017-12-20 08:37:15] [ERROR] [org.jeecgframework.poi.excel.export.ExcelExportServer:171] The maximum length of cell contents (text) is 32,767 characters
java.lang.IllegalArgumentException: The maximum length of cell contents (text) is 32,767 characters
        at org.apache.poi.hssf.usermodel.HSSFCell.setCellValue(HSSFCell.java:548)
        at org.jeecgframework.poi.excel.export.base.ExcelExportBase.createStringCell(ExcelExportBase.java:233)
        at org.jeecgframework.poi.excel.export.base.ExcelExportBase.createCells(ExcelExportBase.java:106)
        at org.jeecgframework.poi.excel.export.ExcelExportServer.createSheet(ExcelExportServer.java:146)
        at org.jeecgframework.poi.excel.ExcelExportUtil.exportExcel(ExcelExportUtil.java:62)
        at org.jeecgframework.poi.excel.view.JeecgSingleExcelView.renderMergedOutputModel(JeecgSingleExcelView.java:59)
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221)
        at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Unknown Source)
[2017-12-20 08:37:15] [ERROR] [org.jeecgframework.poi.excel.export.ExcelExportServer:172] The maximum length of cell contents (text) is 32,767 characters
java.lang.IllegalArgumentException: The maximum length of cell contents (text) is 32,767 characters
        at org.apache.poi.hssf.usermodel.HSSFCell.setCellValue(HSSFCell.java:548)
        at org.jeecgframework.poi.excel.export.base.ExcelExportBase.createStringCell(ExcelExportBase.java:233)
        at org.jeecgframework.poi.excel.export.base.ExcelExportBase.createCells(ExcelExportBase.java:106)
        at org.jeecgframework.poi.excel.export.ExcelExportServer.createSheet(ExcelExportServer.java:146)
        at org.jeecgframework.poi.excel.ExcelExportUtil.exportExcel(ExcelExportUtil.java:62)
        at org.jeecgframework.poi.excel.view.JeecgSingleExcelView.renderMergedOutputModel(JeecgSingleExcelView.java:59)
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221)
        at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Unknown Source)十二月 20, 2017 8:37:15 上午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet springMvc threw exception
org.jeecgframework.poi.exception.excel.ExcelExportException: Excel导出错误
        at org.jeecgframework.poi.excel.export.ExcelExportServer.createSheet(ExcelExportServer.java:173)
        at org.jeecgframework.poi.excel.ExcelExportUtil.exportExcel(ExcelExportUtil.java:62)
        at org.jeecgframework.poi.excel.view.JeecgSingleExcelView.renderMergedOutputModel(JeecgSingleExcelView.java:59)
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221)
       

各位大神,这个问题怎么解决?
最有可能引起的该问题的原因是ClOB字段的字符数太大,难道是它造成的?请求解答
导出Excel的代码平台自动生成,导入功能能正常使用
现有数据确实有4条记录的字段超过了32767,难道真是内容长度引起的?



表结构

表结构
QQ截图20171220085901.png
发表于 2017-12-19 19:29:34 | 显示全部楼层
请详细描述下
 楼主| 发表于 2017-12-20 08:40:59 | 显示全部楼层
admin 发表于 2017-12-19 19:29
请详细描述下

详细问题已经描述
 楼主| 发表于 2017-12-20 09:23:03 | 显示全部楼层
rockysy 发表于 2017-12-20 08:40
详细问题已经描述

如果字符数低于32767,可以导出成功,已验证!是不是一个小的bug
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表