Hi,
Thanks for your reply.
I can't upload an XML file so I copied a sample as a .txt file.
The original XML is WAY larger than this sample that I have included. It does contain the invalid characters but for data protection issues I can't include the full file. If there are any formatting issues other than the invalid characters, they are of my own making when copying the sample. The original xml will import just fine if I manually delete the invalid characters.
P.S. I'm using the following code to import the XML file.
Sub ImportXml()
'
' ImportXml Macro
'
'prompt user to open file
Myfile = Application.GetOpenFilename("Text Files,*.xml") _
' Import xml
ActiveWorkbook.XmlImport URL:=Myfile, _
ImportMap:= _
Nothing, Overwrite:=True, Destination:=Range("$A$1")
End Sub
attachment
Attachment 225871
Bookmarks