Xml parser error

%3CLINGO-SUB%20id%3D%22lingo-sub-2375193%22%20slang%3D%22de-DE%22%3EXml%20parser%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2375193%22%20slang%3D%22de-DE%22%3E%3CP%3EHello%20together%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDuring%20my%20studies%20I%20have%20to%20evaluate%20some%20.xml%20files.%20Therefore%20I%20am%20loading%20the%20.xml%20files%20via%20VBA%20into%20Excel%20and%20afterwards%20I%20am%20able%20to%20check%20the%20data%20of%20the%20xml.%20Right%20now%20I%20got%20a%20problem%2C%20that%20the%20.xml%20is%20not%20included%20in%20the%20right%20shape%20and%20additional%20there%20are%20signs%20that%20are%20%22usually%22%20not%20allowed%20in%20.xml%20files.%20So%20during%20the%20import%20i%20get%20the%20error%20message%20%22runtime%20error%20'-2147217376(80041020)'.%20I%20am%20not%20able%20to%20change%20the%20content%20of%20the%20xml%20so%20I%20am%20searching%20for%20another%20solution.%20Is%20there%20a%20possibility%20to%20read%20the%20xml%20file%20without%20the%20.xmlImport%20function%3F%3CBR%20%2F%3EI%20was%20searching%20in%20a%20lot%20of%20forums%20for%20the%20last%20few%20days%20and%20didn't%20find%20any%20solution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMay%20someone%20of%20you%20has%20an%20solution%20in%20VBA.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20You%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2375193%22%20slang%3D%22de-DE%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2375413%22%20slang%3D%22en-US%22%3ERe%3A%20Xml%20parser%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2375413%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1059846%22%20target%3D%22_blank%22%3E%40Ferdinand1992%3C%2FA%3E%26nbsp%3BI%20don't%20consider%20myself%20very%20knowledgable%20regarding%20XML%2C%20but%20have%20you%20tried%20connecting%20to%20the%20XML%20files%20via%20Power%20Query%3F%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpower-query%2Fconnectors%2Fxml%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpower-query%2Fconnectors%2Fxml%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hello together,

 

during my studies I have to evaluate some .xml files. Therefore I am loading the .xml files via VBA into Excel and afterwards I am able to check the data of the xml. Right now I got a problem, that the .xml is not in the right shape and additional there are signs included which are "usually" not allowed in .xml files. So during the import i get the Error message "Laufzeitfehler '-2147217376(80041020)'. I am not able to change the content of the xml so I am searching for another solution. Is there a possibility to read the xml file without the .xmlImport function?
I was searching in a lot of forums for the last few days and didn't find any solution.

 

May someone of you has an solution in VBA.

 

Thank you

1 Reply

@Ferdinand1992 I don't consider myself very knowledgable regarding XML, but have you tried connecting to the XML files via Power Query?

https://docs.microsoft.com/en-us/power-query/connectors/xml