For Each r As Row In Tables("凭证明细").rows For Each c As Col In r.Table.cols r(c) = cstr(r(c)).trim Next Next
2、报表的问题,做一个按钮,执行下面代码,可以生成对应年月的报表,如
DataTables("科目汇总表").LoadFilter = "年月 = \'2018-01\'" DataTables("科目汇总表").Load Dim Book As New XLS.Book(ProjectPath & "Attachments\\资产负债表.xls") Dim fl As String = ProjectPath & "Reports\\资产负债表.xls" Book.Build() \'生成细节区 Book.Save(fl) \'保存工作簿 Dim Proc As New Process \'打开工作簿 Proc.File = fl Proc.Start()