Application.WorkbookBeforeXmlImport Event (Excel)

Occurs before an existing XML data connection is refreshed, or new XML data is imported into any open Microsoft Excel workbook.


expression. WorkbookBeforeXmlImport( _Wb_ , _Map_ , _Url_ , _IsRefresh_ , _Cancel_ )

expression A variable that represents an [Application](./Excel.Application(Graph property).md) object.


Name Required/Optional Data Type Description
Wb Required Workbook The target workbook.
Map Required XmlMap The XML map that will be used to import data.
Url Required String The location of the XML file to be imported.
IsRefresh Required Boolean True if the event was triggered by refreshing an existing connection to XML data, False if a new mapping will be created.
Cancel Required Boolean Set to True to cancel the import or refresh operation.

Return Value



Use the BeforeXmlImport event if you want to capture XML data that is being imported or refreshed to a particular workbook.

See also

Workbook Object Application Object