1、参考:http://www.foxtable.com/webhelp/topics/1284.htm
cmd.CommandText = "Select inno,proname,prodate,logcode,indate,supplier Fr o m {rs_sourcecode} Where inno = '" & txt & "' "
2、
Dim St2 As XLS.Style = Book.NewStyle
St2.Format = "yyyy-MM-dd"
For r As Integer = 0 To dt.DataRows.Count - 1
For c As Integer = 0 To nms.Count -1
Sheet(r +1, c).Value = dt.DataRows(r)(nms(c)) ’老师我这里面有日期格式的,导出excl显示不是日期怎么办?
if dt.datacols(nms(c)).IsDate then
Sheet(r +1, c).style = St2
end if
Next
Next
3、
dim name as string = "c:\reports\test" & format(date.now,"yyyyMMddHHmmss") & ".xls"
Book.Save(name )