There are a lot of tools out there that help you do this but, frankly, I’ve been trying to get them all to work for a few hours and still don’t have Excel opening my XML (ran across this post googling the same error code.) So, your underlying problem is that your XML file is referencing a DTD file and you need to convert your DTD file to an XML Schema file (you can verify this by opening the document with a program like Notepad++ and looking at the raw text.) Instead, they expect that your XML file will reference an XML Schema. My understanding is that Excel 2007 and later do NOT support DTD. These are defined within each XML file by linking to either a Document Type Definition (“DTD”) or an XML Schema file. So I successfully bypassed the problem by opening the needed file in Excel 2003.Īll XML documents rely upon a definition of what fields are allowed to exist and what values are allowed to exist within each of those fields. I’ve found on the Internet that Office 2007 and older doesn’t prohibit DTD whatever that is. It appeared the file was supposed to be opened in Excel after all. I’ve discovered that the file may be supposed to be opened in Word, not Excel, but the Word 2013 gives me the same error.
The code I’m talking about is the following Set xmlDoc = CreateObject("Msxml2.DOMDocument.6.0") Is there some solution to just open the file without writing a program for it? And if not, what should I do with this code? Should I recite that code aloud before opening a file or what? Sorry, but I find it really absurd. I’ve searched for the solution, but all I found are some pieces of code that are supposed to solve the problem.īut I don’t get it at all! What code? I’m just opening the file, I’m not writing a program or anything.
I’m trying to open an XML file in Excel 2013, but it says it can’t do that because “DTD prohibited”.