Bewerken

Delen via


XmlMap.Import method (Excel)

Imports data from the specified XML data file into cells that have been mapped to the specified XmlMap object.

Syntax

expression.Import (Url, Overwrite)

expression A variable that represents an XmlMap object.

Parameters

Name Required/Optional Data type Description
Url Required String The path to the XML data to import. The path can be specified in Universal Naming convention (UNC) or Uniform Resource Locator (URL) format. The file can be an XML data file.
Overwrite Optional Variant Set to True to overwrite existing data. Set to False to append to existing data. The default value is False.

Return value

An XlXmlImportResult value that indicates the result of the method.

Remarks

If either of the following conditions is True, a run-time error occurs. If more than one condition is True, Excel returns a run-time error for the most severe (they are listed with the most severe listed first):

  • If the XML data contains syntactical errors.
  • If the import is cancelled because not all the data could fit on the worksheet.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.