pjbwai 发表于 2019-9-19 20:42:43

求助:生成代码 导出excel无法导出照片 报 Can't read input file!

基本配置:
         列配置如下:
        @Excel(name="照片",width=15,type=2,imageType=1)
        private java.lang.String pic;
错误堆栈如下:
[org.jeecgframework.poi.excel.export.base.ExcelExp
ortBase:174] Can't read input file!
javax.imageio.IIOException: Can't read input file!
        at javax.imageio.ImageIO.read(ImageIO.java:1301)
        at org.jeecgframework.poi.excel.export.base.ExcelExportBase.createImageCell(Exc
elExportBase.java:169)
        at org.jeecgframework.poi.excel.export.base.ExcelExportBase.createCells(ExcelEx
portBase.java:114)
        at org.jeecgframework.poi.excel.export.ExcelExportServer.createSheet(ExcelExpor
tServer.java:146)
        at org.jeecgframework.poi.excel.ExcelExportUtil.exportExcel(ExcelExportUtil.jav
a:62)
        at org.jeecgframework.poi.excel.view.JeecgSingleExcelView.renderMergedOutputMod
el(JeecgSingleExcelView.java:59)
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:2
67)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.j
ava:1221)
        at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(Disp
atcherServlet.java:1005)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServl
et.java:952)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServle
t.java:870)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkSer
vlet.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.ja
va:837)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123
)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:114)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(Char
acterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterI
nternal(OpenSessionInViewFilter.java:150)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestF
ilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:233)
        at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.
java:191)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va)
        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(Http
11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:722)



      

pjbwai 发表于 2019-9-22 09:27:24

已经解决了。使用了easypoi中的的类
页: [1]
查看完整版本: 求助:生成代码 导出excel无法导出照片 报 Can't read input file!