Java导出Excel的时候报sheetName must not be null?

沙卡拉卡 2017-01-16 09:47:33
ERROR 2017-01-16 09:24:36,367 errorLogger {[message]=sheetName must not be null, [appServer]=, [msgId]=null, [stacktrace]=
Caused by: java.lang.IllegalArgumentException: sheetName must not be null
at org.apache.poi.ss.util.WorkbookUtil.validateSheetName(WorkbookUtil.java:131)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.setSheetName(XSSFWorkbook.java:1348)
at com.lamp.base.util.excle.XLSXSheetUtil.fillData(XLSXSheetUtil.java:353)
at com.lamp.base.util.excle.XLSXSheetUtil.fillData(XLSXSheetUtil.java:525)
at com.lamp.base.util.excle.ExcelSheetUtil.fillData(ExcelSheetUtil.java:52)
at com.lamp.lease.logic.acc.impl.Acc0009r99LogicImpl.printAcc0009r99(Acc0009r99LogicImpl.java:426)
at com.lamp.lease.logic.acc.impl.Acc0009r99LogicImpl.doExecute(Acc0009r99LogicImpl.java:399)
at com.lamp.lease.logic.acc.impl.Acc0009r99LogicImpl$$EnhancedByS2AOP$$686a2d59.$$doExecute$$invokeSuperMethod$$(Acc0009r99LogicImpl$$EnhancedByS2AOP$$686a2d59.java)
at com.lamp.lease.logic.acc.impl.Acc0009r99LogicImpl$$EnhancedByS2AOP$$686a2d59$$MethodInvocation$$doExecute0.proceed(MethodInvocationClassGenerator.java)
at org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:73)
at com.lamp.lease.logic.acc.impl.Acc0009r99LogicImpl$$EnhancedByS2AOP$$686a2d59$$MethodInvocation$$doExecute0.proceed(MethodInvocationClassGenerator.java)
at com.lamp.lease.logic.acc.impl.Acc0009r99LogicImpl$$EnhancedByS2AOP$$686a2d59.doExecute(Acc0009r99LogicImpl$$EnhancedByS2AOP$$686a2d59.java)
at com.lamp.lease.logic.ctr.impl.Ctr0002s01LogicImpl.doAccountingWithdrawInfo(Ctr0002s01LogicImpl.java:1778)
at com.lamp.lease.logic.ctr.impl.Ctr0002s01LogicImpl$$EnhancedByS2AOP$$7f000a53.$$doAccountingWithdrawInfo$$invokeSuperMethod$$(Ctr0002s01LogicImpl$$EnhancedByS2AOP$$7f000a53.java)
at com.lamp.lease.logic.ctr.impl.Ctr0002s01LogicImpl$$EnhancedByS2AOP$$7f000a53$$MethodInvocation$$doAccountingWithdrawInfo6.proceed(MethodInvocationClassGenerator.java)
at org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:73)
at com.lamp.lease.logic.ctr.impl.Ctr0002s01LogicImpl$$EnhancedByS2AOP$$7f000a53$$MethodInvocation$$doAccountingWithdrawInfo6.proceed(MethodInvocationClassGenerator.java)
at com.lamp.lease.logic.ctr.impl.Ctr0002s01LogicImpl$$EnhancedByS2AOP$$7f000a53.doAccountingWithdrawInfo(Ctr0002s01LogicImpl$$EnhancedByS2AOP$$7f000a53.java)
at com.lamp.lease.service.ctr.impl.Ctr0002s01ServiceImpl.doAccountingWithdrawInfo(Ctr0002s01ServiceImpl.java:256)
at com.lamp.lease.service.ctr.impl.Ctr0002s01ServiceImpl$$EnhancedByS2AOP$$375fae6.$$doAccountingWithdrawInfo$$invokeSuperMethod$$(Ctr0002s01ServiceImpl$$EnhancedByS2AOP$$375fae6.java)
at com.lamp.lease.service.ctr.impl.Ctr0002s01ServiceImpl$$EnhancedByS2AOP$$375fae6$$MethodInvocation$$doAccountingWithdrawInfo7.proceed(MethodInvocationClassGenerator.java)
at org.seasar.extension.tx.DefaultTransactionCallback.execute(DefaultTransactionCallback.java:58)
at org.seasar.extension.tx.adapter.JTATransactionManagerAdapter.required(JTATransactionManagerAdapter.java:65)
at org.seasar.extension.tx.RequiredInterceptor.invoke(RequiredInterceptor.java:50)
at com.lamp.lease.service.ctr.impl.Ctr0002s01ServiceImpl$$EnhancedByS2AOP$$375fae6$$MethodInvocation$$doAccountingWithdrawInfo7.proceed(MethodInvocationClassGenerator.java)
at org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:73)
at com.lamp.lease.service.ctr.impl.Ctr0002s01ServiceImpl$$EnhancedByS2AOP$$375fae6$$MethodInvocation$$doAccountingWithdrawInfo7.proceed(MethodInvocationClassGenerator.java)
at com.lamp.lease.service.ctr.impl.Ctr0002s01ServiceImpl$$EnhancedByS2AOP$$375fae6.doAccountingWithdrawInfo(Ctr0002s01ServiceImpl$$EnhancedByS2AOP$$375fae6.java)
at com.lamp.lease.web.ctr.Ctr0002s01Page.doAccountingWithdrawInfo(Ctr0002s01Page.java:1996)
at com.lamp.lease.web.ctr.Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74.$$doAccountingWithdrawInfo$$invokeSuperMethod$$(Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74.java)
at com.lamp.lease.web.ctr.Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74$$MethodInvocation$$doAccountingWithdrawInfo10.proceed(MethodInvocationClassGenerator.java)
at com.lamp.base.util.interceptor.ActionLockIntercepter.invoke(ActionLockIntercepter.java:70)
at com.lamp.lease.web.ctr.Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74$$MethodInvocation$$doAccountingWithdrawInfo10.proceed(MethodInvocationClassGenerator.java)
at com.lamp.base.util.interceptor.LoggingIntercepter.processPageAction(LoggingIntercepter.java:96)
at com.lamp.base.util.interceptor.LoggingIntercepter.invoke(LoggingIntercepter.java:62)
at com.lamp.lease.web.ctr.Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74$$MethodInvocation$$doAccountingWithdrawInfo10.proceed(MethodInvocationClassGenerator.java)
at com.lamp.base.util.interceptor.ActionIntercepter.invoke(ActionIntercepter.java:81)
at com.lamp.lease.web.ctr.Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74$$MethodInvocation$$doAccountingWithdrawInfo10.proceed(MethodInvocationClassGenerator.java)
at org.seasar.framework.aop.interceptors.ThrowsInterceptor.invoke(ThrowsInterceptor.java:79)
at com.lamp.lease.web.ctr.Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74$$MethodInvocation$$doAccountingWithdrawInfo10.proceed(MethodInvocationClassGenerator.java)
at com.lamp.base.util.interceptor.AuthorityCheckIntercepter.invoke(AuthorityCheckIntercepter.java:90)
at com.lamp.lease.web.ctr.Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74$$MethodInvocation$$doAccountingWithdrawInfo10.proceed(MethodInvocationClassGenerator.java)
at com.lamp.base.util.interceptor.ManualURLIntercepter.invoke(ManualURLIntercepter.java:136)
at com.lamp.lease.web.ctr.Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74$$MethodInvocation$$doAccountingWithdrawInfo10.proceed(MethodInvocationClassGenerator.java)
at org.seasar.framework.aop.interceptors.ThrowsInterceptor.invoke(ThrowsInterceptor.java:79)
at com.lamp.lease.web.ctr.Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74$$MethodInvocation$$doAccountingWithdrawInfo10.proceed(MethodInvocationClassGenerator.java)
at org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:73)
at com.lamp.lease.web.ctr.Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74$$MethodInvocation$$doAccountingWithdrawInfo10.proceed(MethodInvocationClassGenerator.java)
at com.lamp.lease.web.ctr.Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74.doAccountingWithdrawInfo(Ctr0002s01Page$$EnhancedByS2AOP$$2442bb74.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.seasar.framework.util.MethodUtil.invoke(MethodUtil.java:96)
at org.seasar.framework.beans.impl.BeanDescImpl.invoke(BeanDescImpl.java:218)
at org.seasar.teeda.extension.html.impl.HtmlComponentInvokerImpl.invoke(HtmlComponentInvokerImpl.java:163)
at org.seasar.teeda.extension.html.impl.HtmlActionListener.processAction(HtmlActionListener.java:71)
at javax.faces.component.UICommand.broadcast(UICommand.java:149)
at org.seasar.teeda.extension.component.html.THtmlCommandButton.broadcast(THtmlCommandButton.java:78)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:192)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:117)
at org.seasar.teeda.core.lifecycle.impl.InvokeApplicationPhase.executePhase(InvokeApplicationPhase.java:29)
at org.seasar.teeda.core.lifecycle.AbstractPhase.execute(AbstractPhase.java:57)
at org.seasar.teeda.core.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:97)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:100)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.lamp.base.util.filter.LoginFilter.doFilter(LoginFilter.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:71)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.seasar.teeda.extension.filter.MultipartFormDataFilter.doFilter(MultipartFormDataFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.seasar.extension.filter.EncodingFilter.doFilter(EncodingFilter.java:69)






我的Excel里有sheet名啊,怎么会报这个错误?
...全文
652 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
咸鱼斯内克 2017-01-16
  • 打赏
  • 举报
回复
要么就直接定义sheet名称吧 createSheet(sheetName);
xiesisi3 2017-01-16
  • 打赏
  • 举报
回复
你这个说明太少了 http://blog.csdn.net/jerehedu/article/details/45195359 自己看着例子写吧
沙卡拉卡 2017-01-16
  • 打赏
  • 举报
回复
引用 1 楼 xiesisi3 的回复:
用的JXL?
打印一下sheetName先
单步调试一下


用的是poi

单步调试sheetName为null,咋整~~
xiesisi3 2017-01-16
  • 打赏
  • 举报
回复
用的JXL? 打印一下sheetName先 单步调试一下
  • 打赏
  • 举报
回复
这种问题你可以断点看一下是不是逻辑的问题,比如sheetname赋值了多次,有些是null,有些非空
打开链接下载源码: https://pan.quark.cn/s/589796089f72 C++课程设计任务列表,涵盖以下内容:1、识别并显示10至99范围内,各位数乘积超过各位数和的数值,例如数字12不满足条件,因为1乘以2小于1加2,故不输出;而数字27满足条件,因为2乘以7大于2加7,因此需要输出该数。2、开发一个功能,用于从用户输入的任意数量实数中找出最大值与最小值:首先要求用户输入一个正整数n,代表数值的个数,随后用户可输入任意n个实数,程序需找出这n个数中的最大值和最小值并将它们展示出来。3、实现两个已排序数组的合并操作:设有数组A和B,且假设这两个数组的元素均已按照降序排列。编写程序将A和B合并成一个新的数组C,并确保C中的元素同样保持降序排列。int A[10]={123, 86,80, 49,33,15,7,0,-1,-3};int B[10]={100,64,51,50,27,19,15,12,5,2};4、设计一个函数,用于计算特定分数序列前n项的总和,该序列为1/2,1/3,1/4,1/5,1/6,1/7,...。要求在主程序中提示用户输入一个整数n,并验证输入的合法性(n需大于1方为有效),若输入合法,则调用求和函数并显示计算结果。5、编写一个程序,计算两个用户输入日期之间的天数差:用户需以year1,month1,day1和year2,month2,day2的格式输入两个日期,程序随后计算这两个日期之间的天数间隔,并将结果输出到屏幕上。要求编制具有如下原型的函数difs2Date:long GetDayDifference(int y1,int m1,int d1,int y2,int m2,int d2);并在主函数中调用此函数,将计...
代码下载地址: https://pan.quark.cn/s/ee8627e4e6d7 ABAP调试器是一种功能强大的工具,可用于在执行期间对ABAP代码进行检验。除了常规的核心功能(例如逐行运行代码以及检验变量、字段符号和引用的值)之外,它还提供了一些辅助性的特性,能够简化并压缩调试会话的时长。并非所有使用者都熟悉这些辅助特性。SAP ABAP调试器是处理和优化ABAP代码开发与维护工作的核心资源,它配备了多样的功能来协助开发人员在运行状态下进行检验和排除故障。此资源着重阐述了ABAP调试器的一些高级特性,涵盖了深入分析调用堆栈、系统级调试、更新会话调试以及提升调试效率的方法。 1. **深入分析调用堆栈**:除了常规的应用程序调试,开发人员有时需要对调用堆栈的内部层级进行深入调试,特别是在错误出现在异步执行的更新处理或系统级程序时。通过启用**系统级调试**,可以访问通常不公开的系统代码,但这也会导致调用堆栈的显著增加,因此需要审慎操作。 2. **系统级调试**:对于不含业务逻辑的系统级程序,开发人员通常无需进行调试。然而,在特定情形下,例如进行错误追踪时,可能需要进入系统代码。借助调试器的“系统调试启用/禁用”选项,可以赋予对系统程序的调试权限。 3. **更新会话调试**:在处理异步更新任务,例如持久化业务数据时,错误可能发生在更新任务内部。激活**更新会话调试**,在更新任务完成后,调试器将自动启动,展示执行路径。比如,在变更成本中心后,通过输入调试指令 "/h" 启动调试,保存后能够看到更新过程中的错误。 4. **分析调用堆栈**:在进行深入调试时,调用堆栈是至关重要的。通过分析调用堆栈,能够定位到引发问题的具体位置,如在VB_V2_NORMAL...
源码链接: https://pan.quark.cn/s/a4b39357ea24 小程序雷达 AI 驱动的小程序生态选型与风险评估工具,把微信小程序开发资源转化为可筛选、可评估、可对比的技术雷达。 线上地址 主站: Vercel: 适合谁 正在做微信小程序技术选型的产品、研发和架构团队。 需要判断 Taro、uni-app、原生小程序、组件库、云开发和 SDK 风险的团队。 需要把历史 awesome 列表转成可筛选、可对比、可验证技术雷达的维护者。 可以做什么 Radar:按推荐状态、风险等级、资源类型、分类和适用场景浏览小程序生态资源。 Quick Search:快速搜索资源并跳转常用页面。 Compare:对比 Taro、uni-app、原生小程序等核心方案。 Advisor:输入选型问题,获得推荐结论、适用/不适用条件、迁移成本、下一步和证据来源。 Doctor:粘贴小程序项目配置,识别框架依赖、过时方案和迁移风险。 Weekly:查看小程序生态周和近期风险信号。 数据概览 当前数据集中包含 236 个小程序生态资源。 完整资源可在 Radar 页面和导出能力中查看。 核心样例 Taro ★30.6k+ - 使用 React 的方式开发小程序的框架,同时支持生成多端应用 uni-app ★36.1k+ - 使用 Vue 语法开发小程序、H5、App的统一框架 MPX ★2.1k+ - 增强型小程序框架,深度性能优化,支持跨小程序平台开发,完全兼容原生小程序组件 WePY ★21.7k+ - 支持组件化的小程序开发框架 vant-weapp ★12.3k+ - 高颜值、好用、易扩展的微信小程序 UI 库 tdesign-miniprogram ★1.3...

62,622

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧