-- 作者:zgjmost
-- 发布时间:2015/6/14 12:04:00
-- 为什么引用出错?
Dim fl As String = ProjectPath & "Reports\\& drs(0)("日期") & drs(0)("起始时间") & drs(0)("教室") & \'签到单\'.xls"
这句话为什么引用报如下错?
此主题相关图片如下:qq截图20150614120426.png
完整代码如下:
For Each ary() As String In DataTables("考试数据表").GetValues("日期|起始时间|教室") Dim drs As List(Of DataRow) = DataTables("考试数据表").Select("日期 = \'" & ary(0) & "\' and 起始时间 = \'" & ary(1) & "\' and 教室 = \'" & ary(2) & "\'", "保密号,试卷号,座位号")
Vars("qdd1") = drs(0)("日期") Vars("qdd2") = drs(0)("起始时间") Vars("qdd3") = drs(0)("教室") Dim Book As New XLS.Book(ProjectPath & "Attachments\\签到单.xls") Dim fl As String = ProjectPath & "Reports\\& drs(0)("日期") & drs(0)("起始时间") & drs(0)("教室") & \'签到单\'.xls" Book.Build() \'生成细节区 Book.Save(fl) \'保存工作簿 Dim Proc As New Process \'打开工作簿 Proc.File = fl Proc.Start()
Next
|