Foxtable(狐表)用户栏目专家坐堂 → 为什么提取的文件名缺了很多?


  共有2864人关注过本帖平板打印复制链接

主题:为什么提取的文件名缺了很多?

帅哥哟,离线,有人找我吗?
南望
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:392 积分:3312 威望:0 精华:0 注册:2014/4/9 10:04:00
为什么提取的文件名缺了很多?  发帖心情 Post By:2015/5/22 11:28:00 [只看该作者]

为什么提取的文件名缺了很多?即提取的文件名不完整

单击事件:

Dim Book As New XLS.Book '定义一个Excel工作簿
Dim Sheet As XLS.Sheet = Book.Sheets(0) '引用工作簿的第一个工作表
Sheet(0, 0).Value = "文件名"
Dim r As Integer = 1

Dim FilePath As WinForm.TextBox = e.Form.Controls("TextBox1")

If FileSys.DirectoryExists(FilePath.Value) Then
    Functions.Execute("文件名提取函数", FilePath.Text, Sheet, r)
End If

Book.Save("c:\reports\test.xls")


递归函数:

Dim path As String = args(0)
Dim Sheet As XLS.Sheet = args(1)
Dim r As Integer = args(2)

For Each file As String In FileSys.GetFiles(path)
    Dim Ifo As new FileInfo(file)
    If Ifo.hidden=False Then
        sheet(r,0).value = file
        r += 1
    End If
Next


For Each p As String In FileSys.GetDirectories(path)
    Functions.Execute("文件名提取函数", p, Sheet, r)
Next

 回到顶部
总数 11 1 2 下一页