我目前使用如下所示的设置。
Set AccessConn = CreateObject("ADODB.Connection")
sExcel = "[Excel 8.0;HDR=YES;IMEX=2;DATABASE=" & ThisWorkbook.FullName & "].[Sheet1$]"
AccessConn.Open "DSN=Foo", "", ""
sSQL = "Insert Into BarTable Select * FROM " + sExcel
AccessConn.Execute sSQL
现在,如果我想在导出中添加 now() 列,这可能吗?就像是
Set AccessConn = CreateObject("ADODB.Connection")
sExcel = "[Excel 8.0;HDR=YES;IMEX=2;DATABASE=" & ThisWorkbook.FullName & "].[Sheet1$]"
AccessConn.Open "DSN=Foo", "", ""
sSQL = "Insert Into BarTable Select *,NOW() FROM " + sExcel
AccessConn.Execute sSQL
BarTable 中的最后一列是日期/时间列,我想将当前时间插入其中?