老大们,刚google了一下,看了半天没有怎么看懂,想在此得到源代码, 呵呵,这样做不厚道,今天状态不佳。感谢高手的帮助哦!!!

解决方案 »

  1.   

    Excel嗷,要看文件头吧。csv都行
      

  2.   


    这样就能遍历所有 ? 具体的,比如说是文件夹:c:\test,然后取出
      

  3.   


    怎么做:比如说是文件夹:c:\test 下所有Excel文件.xls即可,然后取出
      

  4.   

        Dim objSFO
        Dim objFolder
        Dim objFiles
        Dim objFile
        
        Set objSFO = CreateObject("Scripting.FileSystemObject")
        Set objFolder = objSFO.GetFolder("c:\test")
        Set objFiles = objFolder.Files
        
        For Each objFile In objFiles
            If Right(objFile.Name, 4) = ".xls" Then
                MsgBox objFile.Name
            End If
        Next
      

  5.   

    示例
    本示例可实现的功能为:搜索位于“My Documents”文件夹中的所有Excel文件,然后在消息框中显示找到的每个文件的文件名及其所在位置。Set fs = Application.FileSearch
    With fs
        .LookIn = "C:\My Documents"
        .FileType = msoFileTypeExcelWorkbooks
        If .Execute > 0 Then
            MsgBox "There were " & .FoundFiles.Count & _
                " Excel file(s) found."
            For i = 1 To .FoundFiles.Count
                MsgBox .FoundFiles(i)
            Next i
        Else
            MsgBox "There were no Excel files found."
        End If
    End With
      

  6.   

    VBA for Office帮助大全.chm
    http://download.csdn.net/source/1383274