OdsoFieldMapDataCollection Class |
Namespace: Aspose.Words.Settings
The OdsoFieldMapDataCollection type exposes the following members.
Name | Description | |
---|---|---|
![]() | OdsoFieldMapDataCollection | Initializes a new instance of the OdsoFieldMapDataCollection class |
Name | Description | |
---|---|---|
![]() ![]() | Count |
Gets the number of elements contained in the collection.
|
![]() ![]() | Item |
Gets or sets an item in this collection.
|
Name | Description | |
---|---|---|
![]() ![]() | Add |
Adds an object to the end of this collection.
|
![]() ![]() | Clear |
Removes all elements from this collection.
|
![]() | Equals | (Inherited from Object.) |
![]() ![]() | GetEnumerator |
Returns an enumerator object that can be used to iterate over all items in the collection.
|
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() ![]() | RemoveAt |
Removes the element at the specified index.
|
![]() | ToString | (Inherited from Object.) |
Document doc = new Document(MyDir + "Odso data.docx"); // This collection defines how columns from an external data source will be mapped to predefined MERGEFIELD, // ADDRESSBLOCK and GREETINGLINE fields during a mail merge OdsoFieldMapDataCollection fieldMapDataCollection = doc.MailMergeSettings.Odso.FieldMapDatas; Assert.AreEqual(30, fieldMapDataCollection.Count); int index = 0; foreach (OdsoFieldMapData data in fieldMapDataCollection) { Console.WriteLine($"Field map data index #{index++}, type \"{data.Type}\":"); Console.WriteLine( data.Type != OdsoFieldMappingType.Null ? $"\tColumn named {data.Name}, number {data.Column} in the data source mapped to merge field named {data.MappedName}." : "\tNo valid column to field mapping data present."); Assert.AreNotEqual(data, data.Clone()); }