参考代码
Dim dlg As new SaveFileDialog
dlg.Filter = "Excel|*.xls"
If dlg.ShowDialog = DialogResult.OK Then
Dim rows As object
If CurrentTable.ShowCheckBox Then
rows = CurrentTable.GetCheckedRows
Else
rows = CurrentTable.rows
End If
Dim Book As New XLS.Book '定义一个Excel工作簿
Dim Sheet As XLS.Sheet = Book.Sheets(0) '引用工作簿的第一个工作表
For c As Integer = 0 To CurrentTable.Cols.Count -1 '添加列标题
Sheet(0, c).Value = CurrentTable.Cols(c).Name
Next
For r As Integer = 0 To rows.Count - 1 '填入数据
For c As Integer = 0 To CurrentTable.Cols.Count -1
Sheet(r +1, c).Value = rows(r)(c)
Next
Next
book.Save(dlg.FileName)
End If