OdsoFieldMapDataName Property

Specifies the column name within an external data source for the column whose index is specified by the Column property. The default value is an empty string.

Namespace:  Aspose.Words.Settings
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public string Name { get; set; }

Property Value

Type: String
Examples
Shows how to access the collection of data that maps data source columns to merge fields.
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());
}
See Also