Excel Interop XSD and XPath
I am succesfully binding XSD to Excel using Interop (C#) and XPath.
However, there is one thing I am unable to succeed at.
When using the Developer toolbar in Excel it is possible to bind an entire XSD to a cell. This creates some sort of merged row in the Excel sheet for all the attributes in the node. When expanding this row one can receive multiple values for each attribute from XML.
I would like to have this behaviour as well in the code I wrote, but so far I have only been able to map attributes sepperatly to a single cell.
So the question is: Can I bind an entire Node to a cell using interop? Instead of binding the attributes sepperatly.
This is a screenshot of what I have now:
And this is a screenshot of what I want (Manually done in Excel):
I'm unsure on your particular case, but if you're using Excel interop then you can use a little trick.
Create a new macro (in Excel 2007 its View->Macro).
Perform the manual action.
Stop the macro.
Then Step-into the macro and see what the VBA code looks like, will give you a starting point on how to do it with Interop.