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: Most helpful
  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. Anonymous
    2015-03-26T21:46:35+00:00

    Great!  I got 2/3 through my 800 or so .xml files.  They all populated in different tabs and the mapping was preserved in each!

    Then I got another error.  It turns out that some of my files have the exact same name up to and beyond 30 characters.  So there error told me that I can not have two sheets with the same name.  How can we modify this script so that every sheet has a name that is less that 31 characters and yet has a completely unique name?  31 is actually the limit not 30. 

    Or even better would be how can we convince excel to let us have names that are longer then 31 characters?  It would be great to be able to preserve the whole name??

    Thank you,

    Jonathan

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2015-03-26T20:00:57+00:00

    add the bold line

    .................

    s = sFile

    s = Replace(s, ".xml", "")

    If Len(s) > 30 Then s = Left(s, 30)

    For Each ws In ThisWorkbook.Sheets

    If ws.Name = s Then ws.Delete

    Next

    ...............

    Was this answer helpful?

    0 comments No comments