Dim tbl As Table = Args(0)
Dim hdr As Integer = tbl.HeaderRows '获得表头的层数
Dim cnt As Integer
Dim Book As New XLS.Book
Dim Sheet As XLS.Sheet = Book.Sheets(0)
tbl.CreateSheetHeader(Sheet) '生成表头
For c As Integer = 0 To tbl.Cols.Count - 1
If tbl.Cols(c).Visible Then
For r As Integer = 0 To tbl.Rows.Count - 1
If tbl(r,c)<>Nothing
sheet(r + hdr,cnt).value = tbl(r,c)
End If
Next
cnt = cnt + 1
End If
Next
Book.Save("c:\reports\test.xls")
Dim Proc As New Process
Proc.File = "c:\reports\test.xls"
Proc.Start()
[此贴子已经被作者于2018/11/29 9:32:00编辑过]