XmlDataBinding Object
Multiple objects
An XmlDataBinding object represents an XML data binding in a Spreadsheet component. You can bind, or connect, a Spreadsheet component to a data retrieval service, SOAP Web Service, XML file, or Web Part, and that binding is represented by the XmlDataBinding object.
Using the XmlDataBinding Object
The XMLDataBinding object is a member of the XmlDataBindings collection, which is a collection of all of the XmlDataBinding objects in a Spreadsheet component. Within the collection, individual XmlDataBinding objects are indexed beginning with 1 for the first object, 2 for the second, and so on. You can return a XmlDataBinding object from the XmlDataBindings collection by using theItem property of the collection. The argument for the Item property is the index in the collection of the object you want to return or the binding ID of the object. The binding ID is the value of the ID attribute in the XML that represents the binding. You can find this in the XML Spreadsheet file for the Spreadsheet component (or Spreadsheet Web Part) or by examining the BindingData property of the XmlDataBinding object. You can create an XML Spreadsheet file by creating a data bound spreadsheet using Microsoft Excel and then saving the workbook as an XML Spreadsheet.
You create a new XmlDataBinding object using the Add method of the XmlDataBindings collection. Once you have created the XmlDataBinding object, you can use its BindingData property to specify binding configuration information.
The following example shows how to work with each XmlDataBinding object related to a Spreadsheet component:
Dim objBindings
Dim objBinding
Dim strBindingInfo
Set objBindings = Spreadsheet1.ActiveWorkbook.XmlDataBindings
For Each objBinding in objBindings
' Save the XML binding information to a variable.
strBindingInfo = objBinding.BindingData
' Work with the binding information here.
Next