共用方式為


(Excel) 的 Application.DisplayXMLSourcePane 方法

開啟 [XML 來源 ] 工作窗格,並顯示 XmlMap 引數所指定的 XML 對應。

語法

運算式DisplayXMLSourcePane (XmlMap)

expression 代表 Application 物件的變數。

參數

名稱 必要/選用 資料類型 描述
XmlMap 選用 Variant 工作窗格中顯示的 XML 對應。

註解

使用下列程式碼來隱藏 [XML 來源 ] 工作窗格。

Application.CommandBars("XML Source").Visible = False

範例

下列範例會將名為 Customers 的 XML 對應新增至使用中活頁簿,然後在 [XML 來源 ] 工作窗格中顯示 XML 對應。

Sub DisplayXMLMap() 
 Dim objCustomer As XmlMap 
 
 Set objCustomer = ActiveWorkbook.XmlMaps.Add( _ 
 "Customers.xsd", "Root") 
 
 objCustomer.Name = "Customers" 
 
 Application.DisplayXMLSourcePane 
 objCustomer 
End Sub

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應