Consulting

Results 1 to 6 of 6

Thread: MS BROWSER TO EXCEL

  1. #1

    MS BROWSER TO EXCEL

    hi,
    How to export file list in Explorer to Excel, Example: I have 100 of file in D:/item name/
    these file name in windows explorer or directory tobe exported to excel file.
    if any solution , greatly appreciate.

    thanks.

  2. #2
    VBAX Tutor
    Joined
    Jan 2008
    Posts
    266
    Location
    open command prompt.
    start -> run -> cmd [enter]

    type D:\item name\ [enter]
    dir [enter]
    now you will see the filelist.
    rightclick in the window and press mark
    now you can mark an area just like in word
    when you marked the files press CTRL + C
    go to Excel and press CTRL + V

  3. #3
    VBAX Mentor anandbohra's Avatar
    Joined
    May 2007
    Location
    Mumbai
    Posts
    313
    Location
    Quote Originally Posted by Ago
    open command prompt.
    start -> run -> cmd [enter]

    type D:\item name\ [enter]
    dir [enter]
    now you will see the filelist.
    rightclick in the window and press mark
    now you can mark an area just like in word
    when you marked the files press CTRL + C
    go to Excel and press CTRL + V
    the actual is not CTRL+C but enter

    & one more thing if u r working in DOS mode then follow this (Specially for DOS because there is nothing called mark option but can be use in windows)

    use this command
    go to the location whose data u want
    then press dir > filename.txt

    e.g.
    u want data of
    D:\item name

    then go to this location
    press dir >test.txt

    it will create test.txt file in the same location u r using dir command & the contents will be whatever u see in dir command
    Always Mark your Thread as Solved the moment u got acceptable reply (located under Thread tools)
    Practice this & save time of others in thinking for unsolved thread

  4. #4
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    I think he wants to use the dir command from vba.
    [VBA]Sub Fetch_Filenames()
    Dim lrow As Long
    'worksheet
    Dim ws As Worksheet
    'name of file
    Dim v_filename As String
    'path of files
    Dim v_path As String
    'define ws
    Set ws = ActiveWorkbook.ActiveSheet
    'we start at row 2
    lrow = 2
    'directory of your files
    v_path = "C:\Data\*.*"
    'get first filename
    v_filename = Dir(v_path)
    'loop through your files
    Do While v_filename <> ""
    ws.Range("A" & lrow).Value = v_filename
    lrow = lrow + 1
    'get next file
    v_filename = Dir
    Loop
    End Sub[/VBA]
    Charlize

  5. #5
    VBAX Tutor
    Joined
    Jan 2008
    Posts
    266
    Location
    Quote Originally Posted by anandbohra
    the actual is not CTRL+C but enter

    & one more thing if u r working in DOS mode then follow this (Specially for DOS because there is nothing called mark option but can be use in windows)

    use this command
    go to the location whose data u want
    then press dir > filename.txt

    e.g.
    u want data of
    D:\item name

    then go to this location
    press dir >test.txt

    it will create test.txt file in the same location u r using dir command & the contents will be whatever u see in dir command

    oh really? no option called mark huh?
    and CTRL + C is not copy anymore?
    yeah...
    sure...

  6. #6
    VBAX Mentor anandbohra's Avatar
    Joined
    May 2007
    Location
    Mumbai
    Posts
    313
    Location
    Quote Originally Posted by Ago
    oh really? no option called mark huh?
    and CTRL + C is not copy anymore?
    yeah...
    sure...
    yes dude in windows command prompt

    when u right click on black screen u can see following item as right click option

    Mark
    Copy Enter
    Paste
    Select All
    Scroll
    Find...


    & copy is disabled when u click mark & select the area u have to click enter instead of Ctrl+c to copy data to clipboard.


    try it

    I done this at my end that why challanging your quote.
    OS- Windows XP SP2
    Always Mark your Thread as Solved the moment u got acceptable reply (located under Thread tools)
    Practice this & save time of others in thinking for unsolved thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •