老师,用SQL生成的DataTable在导出Excel时应该如何转换为Table
cmd.CommandText = "selec t a.zid,a.jid,a.ItID,a.序号," cmd.CommandText &=" where a.jid = " & r("jid") & " And a.zid = " & r("序号") Dim sdt As DataTable = cmd.ExecuteReader Tables(sdt.Name).SaveExcel(dlg.FileName, r("名称"))
错误提示,不存在“”的Table