Dim dtb As New DataTableBuilder("本期费用占比汇总")
dtb.AddDef("部门编号", GetType(String), 32)
dtb.AddDef("部门名称", GetType(String), 32)
dtb.AddDef("费用类型", GetType(String), 32)
dtb.AddDef("费用项目", GetType(String), 32)
dtb.AddDef("费用占比二月", GetType(Double))
dtb.AddDef("费用占比三月", GetType(Double))
dtb.AddDef("费用占比四月", GetType(Double))
‘此处省略
dtb.AddDef("渠道", GetType(String), 32)
dtb.Build()
Dim Book As New XLS.Book(ProjectPath & "Reports\202410版费用成本.xlsx")
Dim Sheet As XLS.Sheet = Book.Sheets(4)
Tables("本期费用占比汇总").StopRedraw()
Dim nms() As String = {"部门编号", "部门名称", "费用类型", "费用项目", "费用占比二月", "费用占比三月",此处省略, "渠道"}
For n As Integer = 1 To Sheet.Rows.Count - 1
Dim r As Row = Tables("本期费用占比汇总").AddNew()
For m As Integer = 0 To nms.Length - 1
r(nms(m)) = Sheet(n, m).Value
Next
Next
Tables("本期费用占比汇总").ResumeRedraw()
此主题相关图片如下:11.png