For Each d1 As String In FileSys.GetDirectories("g:\ce shi wen jian jia")
Dim dr1 As DataRow = DataTables("表A").AddNew()
dr1("第一列") = filesys.GetName(d1)
For Each d2 As String In FileSys.GetDirectories(d1)
Dim dr2 As DataRow = DataTables("表A").AddNew
dr2("第二列") = filesys.GetName(d2)
For Each d3 As String In FileSys.GetDirectories(d2)
Dim dr3 As DataRow = DataTables("表A").AddNew()
dr3("第三列") = filesys.GetName(d3)
Dim a As String = ""
Dim dr4 As DataRow = DataTables("表A").AddNew()
For Each f4 As String In filesys.GetFiles(d3)
If a > "" Then
a = a & vbcrlf & filesys.GetName(f4)
Else
a = filesys.GetName(f4)
End If
dr4("第四列") = a
Next
Next
Dim b As String = ""
Dim dr5 As DataRow = DataTables("表A").AddNew
For Each f3 As String In filesys.GetFiles(d2)
If b > "" Then
b = b & vbcrlf & filesys.GetName(f3)
Else
b = filesys.GetName(f3)
End If
dr5("第三列") = b
Next
Next
Dim c As String = ""
Dim dr6 As DataRow = DataTables("表A").AddNew
For Each f2 As String In filesys.GetFiles(d1)
If c > "" Then
c = c & vbcrlf & filesys.GetName(f2)
Else
c = filesys.GetName(f2)
End If
dr6("第二列") = c
Next
Next
Dim d As String = ""
Dim dr7 As DataRow = DataTables("表A").AddNew
For Each f1 As String In filesys.GetFiles("g:\ce shi wen jian jia")
If d > "" Then
d = d & vbcrlf & filesys.GetName(f1)
Else
d = filesys.GetName(f1)
End If
dr7("第一列") = d
Next
运行后是图中这种情况,我想把黑圈中的单元格消掉,但不知从何着手
此主题相关图片如下:试运行1(4层).png