时间列为空值时,导出的值多事0.请问下应该怎么改
Dim Book As New XLS.Book '定义一个Excel工作簿
Dim Sheet As XLS.Sheet = Book.Sheets(0) '引用工作簿的第一个工作表
Dim lms As new List(of String)
For Each c As Col In t.Cols
If c.Visible = True
lms.Add(c.Name)
End If
Next
For i As Integer = 0 To lms.Count-1
Sheet(0,i).Value = lms(i)
Next
For r As Integer = 0 To t.Rows.Count-1 '填入数据
For i As Integer = 0 To lms.Count-1
Sheet(r+1,i).Value = t.rows(r)(lms(i))
Next
Next
Dim dlg As New SaveFileDialog '定义一个新的SaveFileDialog
dlg.Filter= "Excel文件|*.xls" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then
Book.Save(dlg.FileName)
Dim Proc As New Process
Proc.File = dlg.FileName
Proc.Start()
End If