.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2020.5.29.8
错误所在事件:窗口,退货明细,Button1,Click
详细错误信息:
无法在流的结尾之外进行读取。
'''
Dim 回执单号 As String=Date.Now.Year & Date.Now.Month & Date.Now.Day & CInt((DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000)
With Tables("退货明细")
For i As Integer = .TopPosition To .BottomPosition
.Rows(i)("批次号")=回执单号
Next
End With
DataTables("退货明细").Save()
'【生成报表代码】
Dim Book As New XLS.Book(ProjectPath & "Attachments\工作簿1.xls")
Dim fl As String = ProjectPath & "Reports\工作簿1.xls"
Book.Build() '生成细节区
Book.Sheets(0).Rows.RemoveAt(0) '删除第一行,Excel报表的第一行通常是标记行
Book.Save(fl) '保存工作簿
Dim Proc As New Process '打开工作簿
Proc.File = fl
Proc.Start()