-- 进入了死循环
Tables("四年级").Filter = ""
Tables("四年级").Sort = ""
DataTables("四年级").ReplaceFor("是否有照片","False","是否有照片=\'True\'")
For Each r As Row In Tables("四年级").Rows
Dim m As String = projectpath & "Attachments\\" & r("相片")
If FileSys.FileExists(m)=False Then
r("是否有照片")= True
End If
Next
For Each r As Row In Tables("四年级").Rows
Dim n As String = projectpath & "Attachments\\" & r("相片")
If FileSys.FileExists(n)=True Then
Messagebox.Show(n & "有相片!","提示")
Else
Tables("四年级").Filter = "[是否有照片]=true"
Dim t As Table = Tables("四年级")
t.Select(0,0,t.rows.count-1,t.cols.count-1)
Dim Book As New XLS.Book(ProjectPath & "Attachments\\网络.xls")
Dim fl As String = ProjectPath & "Reports\\网络.xls"
Book.Build() \'生成细节区
Book.Save(fl) \'保存工作簿
Dim Proc As New Process \'打开工作簿
Proc.File = fl
Proc.Start()
End If
Next
我这个名令进入了死循环, 我想是 如果有照片的文件就提示“有相片”, 没有的话就导出无相片学生的报表