表示 ExportXML 方法所導(dǎo)出的父表中包含的表和查詢(xún)的集合。
要?jiǎng)?chuàng)建 AdditionalData 對(duì)象,請(qǐng)使用 Application 對(duì)象的 CreateAdditionalData 方法。
要向現(xiàn)有 AdditionalData 對(duì)象添加表,請(qǐng)使用 Add 方法。
下面的示例將 Northwind Traders 示例數(shù)據(jù)庫(kù)的Customers 表格的內(nèi)容連同 Orders 和 Orders Details 表的內(nèi)容一起導(dǎo)出到名為 Customer Orders.xml 的 XML 數(shù)據(jù)文件中。
Sub ExportCustomerOrderData()
Dim objOrderInfo As AdditionalData
Set objOrderInfo = Application.CreateAdditionalData
' Add the Orders and Order Details tables to the data to be exported.
objOrderInfo.Add "Orders"
objOrderInfo.Add "Order Details"
' Export the contents of the Customers table. The Orders and Order
' Details tables will be included in the XML file.
Application.ExportXML ObjectType:=acExportTable, DataSource:="Customers", _
DataTarget:="Customer Orders.xml", _
AdditionalData:=objOrderInfo