excel 报表的字段列名 想按照标题来显示? Post By:2015/3/23 11:13:00 [只看该作者]
excel 报表的字段列名 想按照标题来显示 ?为啥对应不起来
Dim Book As New XLS.Book(ProjectPath & "Attachments\月统计.xls") Dim fl As String = ProjectPath & "Reports\月统计.xls" Dim dt As Table = Tables("统计表1") Dim Sheet As XLS.Sheet = Book.Sheets(0) For c As Integer = 0 To dt.Cols.Count-1 '添加列标题 Sheet(2, c).Value = dt.Cols(c).caption Next Book.Build() '生成细节区 Book.Save(fl) '保存工作簿 Dim Proc As New Process '打开工作簿 Proc.File = fl Proc.Start()