Microsoft Office Tutorials and References
In Depth Information
Table 26-3. Selected Properties and Methods of the
XmlMap Object (continued)
Property or Method
Description
Method
Import(Url, Overwrite)
The Import method writes data from the file at the
specified URL to cells mapped with the XMLMap
that called the method. The Url argument holds a
file path or Web address. The Overwrite argument is
a variant that, when set to False (the default),
appends the imported data after any existing data,
or when set to True overwrites any existing data. The
Import method returns one of three constants:
xlXmlImportElementsTruncated , which indicates that
the contents of the specified XML data file have
been truncated because the XML data file is too
large for a cell; xlXmlImportSuccess , which indicates
the import was successful; and
xlXmlImportValidationFailed , which indicates that the
contents of the XML data file don’t match the
specified schema.
ImportXml(XmlData,
Overwrite)
The ImportXml method writes data from a string
variable (specified in the XmlData argument) to cells
mapped with the XmlMap that called the method.
The Overwrite argument is a variant that, when set
to False (the default), appends the imported data
after any existing data, or when set to True
overwrites any existing data. The method returns
one of three constants:
xlXmlImportElementsTruncated , which indicates that
the contents of the specified XML data file have
been truncated because the XML data file is too
large for a cell; xlXmlImportSuccess , which indicates
the import was successful; and
xlXmlImportValidationFailed , which indicates that the
contents of the XML data file don’t match the
specified schema.
All the schemas assigned to a workbook are stored in the Workbook object’s XmlMaps collec­
tion. You can refer to individual members of the collection by noting their names, as in the
following statement:
ActiveWorkbook.XmlMaps(“Root_Map”)
Search JabSto ::




Custom Search