起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4819|回复: 5

[处理中3] Excel导入指定了日期转换,删除日期后导入报错

[复制链接]

59

主题

182

帖子

755

积分

高级会员

Rank: 4

积分
755
QQ
发表于 2021-1-8 08:51:56 | 显示全部楼层 |阅读模式
版本: BeX5V3.5 小版本号:
数据库: Oracle 服务器操作系统: Windows 应用服务器:
客户端操作系统: Windows 7 浏览器: Chrome
使用了平台的Excel导入

配置指定了转换日期
<relation name="fEndDate"  cell-number="5" date-pattern="yyyy-MM-dd"  />

导入时,如果fEndDate列本来有日期,删除后再导入会报错, 这个如何解决

2021-01-08 08:51:18 excute stream action, params:{"accept":"application/json","action":"importExcel","actionFlag":"__action_0__","activity":"mainActivity","contentType":"json","executeContext":"","executor":"","parameters":{"config":{"@type":"xml","xml":"<config use-default=\"true\" to=\"UI\" excel-file=\"E:\\DevTools\\BeX5_V3.8\\apache-tomcat\\temp\\0344b4d7-485c-493d-ac77-4c85f9dd91a8.excel.tmp\" mapping-file=\"E:\\DevTools\\BeX5_V3.8\\apache-tomcat\\temp\\28f51617-b06a-4a6f-8be0-836a61b60cfc.excel.tmp\"><data><concept name=\"subSRM_Price_Comparison\"><relation name=\"fBalanceSheet\" type=\"String\"/><relation name=\"fBeginDate\" type=\"Date\"/><relation name=\"fBracketCoverPlate\" type=\"String\"/><relation name=\"fCheckDate\" type=\"Date\"/><relation name=\"fCheckPsn\" type=\"String\"/><relation name=\"fConsumptionQuota\" type=\"String\"/><relation name=\"fCost\" type=\"Decimal\"/><relation name=\"fCostTypeName\" type=\"String\"/><relation name=\"fCreateDate\" type=\"Date\"/><relation name=\"fCreateDeptID\" type=\"String\"/><relation name=\"fCreateDeptName\" type=\"String\"/><relation name=\"fCreateOgnID\" type=\"String\"/><relation name=\"fCreateOgnName\" type=\"String\"/><relation name=\"fCreatePosID\" type=\"String\"/><relation name=\"fCreatePosName\" type=\"String\"/><relation name=\"fCreatePsnCode\" type=\"String\"/><relation name=\"fCreatePsnFID\" type=\"String\"/><relation name=\"fCreatePsnFName\" type=\"String\"/><relation name=\"fCreatePsnID\" type=\"String\"/><relation name=\"fCreatePsnName\" type=\"String\"/><relation name=\"fCreateTime\" type=\"DateTime\"/><relation name=\"fCustomContent1\" type=\"String\"/><relation name=\"fCustomContent2\" type=\"String\"/><relation name=\"fCustomContent3\" type=\"String\"/><relation name=\"fCustomContent4\" type=\"String\"/><relation name=\"fCustomContent5\" type=\"String\"/><relation name=\"fCustomerCode\" type=\"String\"/><relation name=\"fCustomerName\" type=\"String\"/><relation name=\"fDepreciation\" type=\"String\"/><relation name=\"fDiagramNo\" type=\"String\"/><relation name=\"fEndDate\" type=\"Date\"/><relation name=\"fForm\" type=\"String\"/><relation name=\"fInvCCode\" type=\"String\"/><relation name=\"fInvCName\" type=\"String\"/><relation name=\"fInvCode\" type=\"String\"/><relation name=\"fInvName\" type=\"String\"/><relation name=\"fInvStd\" type=\"String\"/><relation name=\"fLaborQuota\" type=\"String\"/><relation name=\"fMaterial\" type=\"String\"/><relation name=\"fNetWeight\" type=\"String\"/><relation name=\"fOutsourcingGalvanizing\" type=\"String\"/><relation name=\"fOutsourcingProcessing\" type=\"String\"/><relation name=\"fOutsourcingSurfaceTreatment\" type=\"String\"/><relation name=\"fPaintAndtreatmentAgent\" type=\"String\"/><relation name=\"fProductLine\" type=\"String\"/><relation name=\"fProductionCost\" type=\"String\"/><relation name=\"fRemark\" type=\"String\"/><relation name=\"fRowAmount\" type=\"Decimal\"/><relation name=\"fSRMOgnCode\" type=\"String\"/><relation name=\"fSelfMadeCoating\" type=\"String\"/><relation name=\"fSelfMadeDusting\" type=\"String\"/><relation name=\"fSelfMadeProcessing\" type=\"String\"/><relation name=\"fSlidingType\" type=\"String\"/><relation name=\"fSocialInsurance\" type=\"String\"/><relation name=\"fTypeCode\" type=\"String\"/><relation name=\"fTypeName\" type=\"String\"/><relation name=\"fWasteLoss\" type=\"String\"/><relation name=\"fWaterElectricityGas\" type=\"String\"/><relation name=\"fYear\" type=\"String\"/><relation name=\"subSRM_Price_Comparison\" type=\"String\"/><relation name=\"version\" type=\"Integer\"/></concept></data></config>"},"createActionParam":{"action":"createSubSRM_Price_ComparisonAction","activity":"assemblyCostList","parameters":{"table":{"@type":"table","rows":[],"userdata":{"idColumnDefine":"subSRM_Price_Comparison","idColumnName":"subSRM_Price_Comparison","idColumnType":"String","model":"/subSRM/priceControl/data","relationAlias":"fBalanceSheet,fBeginDate,fBracketCoverPlate,fCheckDate,fCheckPsn,fConsumptionQuota,fCost,fCostTypeName,fCreateDate,fCreateDeptID,fCreateDeptName,fCreateOgnID,fCreateOgnName,fCreatePosID,fCreatePosName,fCreatePsnCode,fCreatePsnFID,fCreatePsnFName,fCreatePsnID,fCreatePsnName,fCreateTime,fCustomContent1,fCustomContent2,fCustomContent3,fCustomContent4,fCustomContent5,fCustomerCode,fCustomerName,fDepreciation,fDiagramNo,fEndDate,fForm,fInvCCode,fInvCName,fInvCode,fInvName,fInvStd,fLaborQuota,fMaterial,fNetWeight,fOutsourcingGalvanizing,fOutsourcingProcessing,fOutsourcingSurfaceTreatment,fPaintAndtreatmentAgent,fProductLine,fProductionCost,fRemark,fRowAmount,fSRMOgnCode,fSelfMadeCoating,fSelfMadeDusting,fSelfMadeProcessing,fSlidingType,fSocialInsurance,fTypeCode,fTypeName,fWasteLoss,fWaterElectricityGas,fYear,version","relationTypes":"String,Date,String,Date,String,String,Decimal,String,Date,String,String,String,String,String,String,String,String,String,String,String,DateTime,String,String,String,String,String,String,String,String,String,Date,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,String,Decimal,String,String,String,String,String,String,String,String,String,String,String,Integer","relations":"subSRM_Price_Comparison.fBalanceSheet,subSRM_Price_Comparison.fBeginDate,subSRM_Price_Comparison.fBracketCoverPlate,subSRM_Price_Comparison.fCheckDate,subSRM_Price_Comparison.fCheckPsn,subSRM_Price_Comparison.fConsumptionQuota,subSRM_Price_Comparison.fCost,subSRM_Price_Comparison.fCostTypeName,subSRM_Price_Comparison.fCreateDate,subSRM_Price_Comparison.fCreateDeptID,subSRM_Price_Comparison.fCreateDeptName,subSRM_Price_Comparison.fCreateOgnID,subSRM_Price_Comparison.fCreateOgnName,subSRM_Price_Comparison.fCreatePosID,subSRM_Price_Comparison.fCreatePosName,subSRM_Price_Comparison.fCreatePsnCode,subSRM_Price_Comparison.fCreatePsnFID,subSRM_Price_Comparison.fCreatePsnFName,subSRM_Price_Comparison.fCreatePsnID,subSRM_Price_Comparison.fCreatePsnName,subSRM_Price_Comparison.fCreateTime,subSRM_Price_Comparison.fCustomContent1,subSRM_Price_Comparison.fCustomContent2,subSRM_Price_Comparison.fCustomContent3,subSRM_Price_Comparison.fCustomContent4,subSRM_Price_Comparison.fCustomContent5,subSRM_Price_Comparison.fCustomerCode,subSRM_Price_Comparison.fCustomerName,subSRM_Price_Comparison.fDepreciation,subSRM_Price_Comparison.fDiagramNo,subSRM_Price_Comparison.fEndDate,subSRM_Price_Comparison.fForm,subSRM_Price_Comparison.fInvCCode,subSRM_Price_Comparison.fInvCName,subSRM_Price_Comparison.fInvCode,subSRM_Price_Comparison.fInvName,subSRM_Price_Comparison.fInvStd,subSRM_Price_Comparison.fLaborQuota,subSRM_Price_Comparison.fMaterial,subSRM_Price_Comparison.fNetWeight,subSRM_Price_Comparison.fOutsourcingGalvanizing,subSRM_Price_Comparison.fOutsourcingProcessing,subSRM_Price_Comparison.fOutsourcingSurfaceTreatment,subSRM_Price_Comparison.fPaintAndtreatmentAgent,subSRM_Price_Comparison.fProductLine,subSRM_Price_Comparison.fProductionCost,subSRM_Price_Comparison.fRemark,subSRM_Price_Comparison.fRowAmount,subSRM_Price_Comparison.fSRMOgnCode,subSRM_Price_Comparison.fSelfMadeCoating,subSRM_Price_Comparison.fSelfMadeDusting,subSRM_Price_Comparison.fSelfMadeProcessing,subSRM_Price_Comparison.fSlidingType,subSRM_Price_Comparison.fSocialInsurance,subSRM_Price_Comparison.fTypeCode,subSRM_Price_Comparison.fTypeName,subSRM_Price_Comparison.fWasteLoss,subSRM_Price_Comparison.fWaterElectricityGas,subSRM_Price_Comparison.fYear,subSRM_Price_Comparison.version","updateMode":"whereVersion"}}},"process":"/subSRM/priceControl/process/priceComparison/priceComparisonProcess"}},"process":"/SA/excel/system/systemProcess"}
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.justep.system.action.Engine.invokeActions(Native Method)
        at com.justep.system.action.Engine.invokeActions(Unknown Source)
        at com.justep.business.server.BusinessServer.doAction(Unknown Source)
        at com.justep.business.server.BusinessServer.doExcute(Unknown Source)
        at com.justep.business.server.BusinessServer.excute(Unknown Source)
        at com.justep.business.server.BusinessServer.excute(Unknown Source)
        at com.justep.business.server.BusinessServerServlet.execService(Unknown Source)
        at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.justep.micro.service.MicroServiceFilter.doFilter(Unknown Source)
        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:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.justep.excel.ExcelException: 编码: JUSTEP170009; 提示:
        at com.justep.excel.ExcelException.create(ExcelException.java:32)
        at com.justep.excel.ImportGenerator.formatDate(ImportGenerator.java:257)
        at com.justep.excel.ImportGenerator.getValue(ImportGenerator.java:298)
        at com.justep.excel.ImportGenerator.setCellsValue(ImportGenerator.java:238)
        at com.justep.excel.ImportGenerator.generateRecord(ImportGenerator.java:203)
        at com.justep.excel.ImportGenerator.generateSheet(ImportGenerator.java:198)
        at com.justep.excel.ImportGenerator.generate(ImportGenerator.java:131)
        at Excel.importExcel(Excel.java:90)
        ... 30 more
Caused by: java.text.ParseException: Unparseable date: ""
        at java.text.DateFormat.parse(DateFormat.java:366)
        at com.justep.excel.ImportGenerator.formatDate(ImportGenerator.java:255)
        ... 36 more


91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36064
发表于 2021-1-8 10:20:47 | 显示全部楼层
excel中右键单元格格式设置为日期类型的看看
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

59

主题

182

帖子

755

积分

高级会员

Rank: 4

积分
755
QQ
 楼主| 发表于 2021-1-8 16:32:20 | 显示全部楼层
jishuang 发表于 2021-1-8 10:20
excel中右键单元格格式设置为日期类型的看看

这个本来就是设置为日期类型的,然后原来有内容,再删除,导入就会报这个错误
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36064
发表于 2021-1-8 17:55:18 | 显示全部楼层
原来没有数据的没问题,只有有数据的删除就报错?
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

59

主题

182

帖子

755

积分

高级会员

Rank: 4

积分
755
QQ
 楼主| 发表于 2021-1-27 14:35:12 | 显示全部楼层
jishuang 发表于 2021-1-8 17:55
原来没有数据的没问题,只有有数据的删除就报错?

是的
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36064
发表于 2021-1-27 18:40:15 | 显示全部楼层
原来没有数据和有数据的删除右键单元格设置中显示的一样吗?
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-11-21 20:04 , Processed in 0.078806 second(s), 25 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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