The "Export" button under Developer -> XML in Microsoft Excel is used to export XML data to an XML data file. This feature is designed to export XML data that has been imported into Excel using the "Developer -> XML" functionality or other XML data import methods. It allows users to save the data in an XML format that can be used for further processing or sharing with other applications.
However, the "Export" button is not meant to export any XML data that was not previously imported into Excel. It does not provide a generic way to export arbitrary XML data to an XML file. Therefore, trying to export XML data that was manually entered or copied into Excel will likely result in an error, as you mentioned.
In the specific case of the sample XML you provided, it was not imported into Excel using the XML import functionality. It was manually entered as text in the worksheet. Therefore, attempting to export it using the "Export" button will not work, and you will encounter the error.
If you want to export the sample XML data to an XML file, you will need to use other methods outside of Excel, such as saving the sample XML data directly to a text file with a ".xml" extension using a text editor or a specialized XML editor.
To summarize, the "Export" button in Excel is intended for exporting previously imported XML data, and it won't work for arbitrary XML data entered manually. If you need to save XML data that was not imported into Excel, you'll have to use other methods for exporting it to an XML file.
--please don't forget to upvote and Accept as answer if the reply is helpful--