.NET Framework 版本:2.0.50727.9031
Foxtable 版本:2018.10.9.1
错误所在事件:
详细错误信息:
从字符串“”到类型“Single”的转换无效。
输入字符串的格式不正确。
-----------------------------------------------------------------------------------------------------------------
从系统下载了2个订单表,开始是可以的,但是后来下的就报错,对比了表格也没发现哪里有问题,麻烦帮我看下
--------------------------------------------------------------------------------------------------------------------------------
导入 代码如下:
--------------------------------------------------------------------------------------------------------------------------------
Dim dlg As New OpenFileDialog '定义一个新的OpenFileDialog
dlg.Filter = "Excel文件|*.xls;*.xlsx"
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Dim mg As New Merger
mg.SourcePath = dlg.FileName
mg.Format = "excel" '指定格式
mg.SourceTableName = "报表1$"
mg.DataTableName = "订单临时表"
mg.FieldMaps.Add("旺旺/昵称","客户ID")
mg.FieldMaps.Add("系统订单号","系统单号")
mg.Merge()
DataTables("订单临时表").DataCols("系统单号").RaiseDataColChanged()
End If
Dim Cols1() As String = {"系统单号","平台订单号","付款时间","发货时间","实付金额","订单金额","商品净重","实收运费"}
Dim Cols2() As String = {"系统单号","订单号","付款时间","发货时间","实付总金额","订单总金额","商品总重","运费"}
For Each dr1 As DataRow In DataTables("订单临时表").Select("[订单金额] > 1")
Dim dr2 As DataRow = DataTables("订单临时表汇总").AddNew()
For i As Integer = 0 To Cols1.Length -1
dr2(Cols2(i)) = dr1(Cols1(i))
Next
Next
Syscmd.Project.Save()