How to: Add XMLMappedRange controls to worksheets
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
When you map an XML element to a cell in Microsoft Office Excel, Visual Studio automatically adds an XmlMappedRange control to your worksheet.
Applies to: The information in this topic applies to document-level projects for Excel. For more information, see Features available by Office application and project type.
Note
The XmlMappedRange control is not available on the Toolbox or the Data Sources window. Additionally, you cannot create XmlMappedRange controls programmatically.
To add an XMLMappedRange control to a worksheet
Open the Excel workbook in the Visual Studio designer.
Open the worksheet where you want to add the control.
On the Developer tab, click Source.
Note
If the Developer tab is not visible on the Ribbon, you must enable it. For more information, see How to: Show the Developer tab on the Ribbon.
The XML Source task pane appears.
In the XML Source task pane, click XML Maps.
In the XML Maps dialog box, click Add.
The XML Source dialog box appears.
Select an XML schema from the XML Source dialog box and click Open.
The schema is added to the XML Maps dialog box.
In the XML Maps dialog box, click OK.
Drag an element from the XML Source task pane to a cell on the worksheet.
An XmlMappedRange is created and added to the project.
Note
If you drag a parent element from the XML Source task pane, a ListObject control is created.