Dim b162 As New CrossTableBuilder("自定义费用汇总",DataTables("自定义费用明细"))
b162.HGroups.AddDef("部门名称")
b162.HGroups.AddDef("事业部")
b162.HGroups.AddDef("月份")
b162.VGroups.AddDef(HZ3)
b162.Totals.AddDef("金额")
b162.HorizontalTotal=True
b162.Subtotal=True
b162.Filter = "(" & filter & ") and 年份 = '" & n1 & "'"
b162.Build
Dim dt As Table = Tables("自定义费用汇总")
Dim Book As New XLS.Book(ProjectPath & "Attachments\报表.xlsx")
Dim fl As String = ProjectPath & "Reports\报表.xlsx"
Dim Sheet As XLS.Sheet = Book.Sheets(16)
For c As Integer = 0 To dt.Cols.Count -1
Sheet(0, c+1).Value = dt.Cols(c).Caption
Next
For r As Integer = 0 To dt.Rows.Count - 1
For c As Integer = 0 To dt.Cols.Count -1
Sheet(r +1, c+1).Value = dt.rows(r)(c)
Next
Next
如何将汇总行一起导出来呢