Convert xs:Enumerations in XSD to dropdown lists in Excel

excel, xml, xsd

Solution

As xcut says, there is no easy way to do this. But it can be done. What you'll need to do is:

- Use the `WorkbookAfterXmlImport` event to read your schema with MSXML for your enums.

- Find the mapped column in your data table for the element that has your enums in code. This is usually a `ListObject`.

- Add these enums to a list in `Validation.InCellDropdown` to your mapped column range, minus the heading.

Problem

I have an XSD file which contains the schema for my XML. The XSD file contains an `xs:Enumeration` definition, which allows me to choose between 5 options as a value for one of the nodes. Now, we want to be able to generate this data through Excel, so that non-technical people can create it. When I import this XSD file into Excel, i want the `xs:enumeration` values to be listed as dropdowns. How do I get to do that? Edit: Starting a bounty. To win, I need a working sample code for this :)

Original source