How to import multiple xml file into excel

Anonymous
2012-09-13T00:07:12+00:00

I have a lot of xml files which need to be imported into single excel file. I can able to import one by one but cannot select all at a time to import.

Is it possible to do through batch process or any other process?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

66 additional answers

Sort by: Oldest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Anonymous
    2014-01-24T13:52:07+00:00

    Option Explicit

    Sub GetLmsDtata()

    On Error Resume Next

    Dim xRow As Long

    Dim path As String

    Dim strSheetName As String

    Dim xDirect$, xFname$, InitialFoldr$

    InitialFoldr$ = "C:\Users%username%"

    With Application.FileDialog(msoFileDialogFolderPicker)

    .InitialFileName = Application.DefaultFilePath & ""

    .Title = "Please select a folder

    contains xml Files"

    .InitialFileName = InitialFoldr$

    .Show

    If .SelectedItems.Count <> 0 Then

    xDirect$ = .SelectedItems(1) & ""

    xFname$ = Dir(xDirect$ & "*xml")

    Do While xFname$ <> ""

    path = (xDirect$ & xFname$)

    ActiveWorkbook.XmlImport URL:= _

    path, _

    ImportMap:=Nothing, Overwrite:=True, Destination:=ActiveCell

    Selection.End(xlDown).Offset(1, 0).Select

    xFname$ = Dir()

    Loop

    End If

    End With

    End Sub

    Was this answer helpful?

    0 comments No comments