Opening an XML File in Excel

John Ellis
John Ellis used Ask the Experts™
on
Hello:

We have an XML file that we would like to open in Excel.  We have tried two methods.  Both have failed.

First, we tried opening Excel, browsing out to the file, and simply opening the file.  But, upon trying to do so and using one of the suggested methods, we get an error saying "cannot load the specified XML".

Also, we have tried opening the XML file by opening Excel, choosing "Data", "Get Data", "From File", and "From XML", we get the error message "XML processing failed...Data at the root level is invalid".

How can we, then, open an XML file in Excel?

Thank you!

John
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT System Administrator
Distinguished Expert 2017
Commented:
It sounds like the xml file you are trying to open doesn't have the correct header information that Excel is expecting. You could try opening it with something like Notepad++ and using the XML Tools plugin to format it and see if something is missing at the top.

It might be missing some part of the header like:
<?xml version="1.0" encoding="utf-8"?>

Open in new window

Author

Commented:
Thank you, for pointing that out, Mike!  Much appreciated!

Besides formatting the file, though, is there another means of doing this?

Thanks, again!

John
Mike in ITIT System Administrator
Distinguished Expert 2017

Commented:
Formatting the file just makes it easier to find and correct any format related errors. If you know XML really well you could probably do it without the formatting, but formatting and syntax highlighting will make it much easier.

I know that Notepad++ has built-in syntax highlighting for XML, the XML Tools is a plugin though that you will have to get in addition to Notepad++.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Hi:

I still would like an easier way of doing this.  Is there a free tool that is downloadable perhaps that can open an XML file?

I suppose this does not have to be done in Excel.  I just want to be able to view the data in the file a lot easier than what is offered by opening the file in, say, Notepad.

Thanks, again, for your thoughts!

John
Mike in ITIT System Administrator
Distinguished Expert 2017

Commented:
Notepad++ is free, but it is just a notepad. If you do a search in Google for "XML viewer free" there are several options that you could try. Not sure exactly what would work best for you.
TracyVBA Developer

Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Mike in IT (https:#a42440352)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

broomee9
Experts-Exchange Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial