Name

xmlmap.AppendOnImport [= setting]

Synopsis

Sets or returns a value indicating whether to append data to mapped lists rather than replacing the data in the list. Default is False.

Set the AppendOnImport property to True when you want to append multiple XML data sources to a single XML map. For example, the following code stores three rows of data in a map:

Set xmap = ThisWorkbook.XmlMaps("Numbers_Map")
xmap.AppendOnImport = True
xmap.ImportXml ("<Numbers><Number><One>1</One><Two>2</Two>" & _
  "<Three>3</Three></Number></Numbers>")
xmap.ImportXml ("<Numbers><Number><One>4</One><Two>5</Two>" & _
  "<Three>6</Three></Number></Numbers>")
xmap.ImportXml ("<Numbers><Number><One>7</One><Two>8</Two>" & _
  "<Three>9</Three></Number></Numbers>")

If you change AppendOnImport to False in the preceding code, only the last row (7, 8, 9) is stored in the map.

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.