Odso

Inheritance: java.lang.Object

All Implemented Interfaces: java.lang.Cloneable

public class Odso implements Cloneable

Specifies the Office Data Source Object (ODSO) settings for a mail merge data source.

To learn more, visit the Mail Merge and Reporting documentation article.

Remarks:

ODSO seems to be the “new” way the newer Microsoft Word versions prefer to use when specifying certain types of data sources for a mail merge document. ODSO probably first appeared in Microsoft Word 2000.

The use of ODSO is poorly documented and the best way to learn how to use the properties of this object is to create a document with a desired data source manually in Microsoft Word and then open that document using Aspose.Words and examine the properties of the Document.getMailMergeSettings() / Document.setMailMergeSettings(com.aspose.words.MailMergeSettings) and MailMergeSettings.getOdso() / MailMergeSettings.setOdso(com.aspose.words.Odso) objects. This is a good approach to take if you want to learn how to programmatically configure a data source, for example.

You do not normally need to create objects of this class directly because ODSO settings are always available via the MailMergeSettings.getOdso() / MailMergeSettings.setOdso(com.aspose.words.Odso) property.

Methods

MethodDescription
deepClone()Returns a deep clone of this object.
getColumnDelimiter()Specifies the character which shall be interpreted as the column delimiter used to separate columns within external data sources.
getDataSource()Specifies the location of the external data source to be connected to a document to perform the mail merge.
getDataSourceType()Specifies the type of the external data source to be connected to as part of the ODSO connection information for this mail merge.
getFieldMapDatas()Gets a collection of objects that specify how columns from the external data source are mapped to the predefined merge field names in the document.
getFirstRowContainsColumnNames()Specifies that a hosting application shall treat the first row of data in the specified external data source as a header row containing the names of each column in the data source.
getRecipientDatas()Gets a collection of objects that specify inclusion/exclusion of individual records in the mail merge.
getTableName()Specifies the particular set of data that a source shall be connected to within an external data source.
getUdlConnectString()Specifies the Universal Data Link (UDL) connection string used to connect to an external data source.
setColumnDelimiter(char value)Specifies the character which shall be interpreted as the column delimiter used to separate columns within external data sources.
setDataSource(String value)Specifies the location of the external data source to be connected to a document to perform the mail merge.
setDataSourceType(int value)Specifies the type of the external data source to be connected to as part of the ODSO connection information for this mail merge.
setFieldMapDatas(OdsoFieldMapDataCollection value)Sets a collection of objects that specify how columns from the external data source are mapped to the predefined merge field names in the document.
setFirstRowContainsColumnNames(boolean value)Specifies that a hosting application shall treat the first row of data in the specified external data source as a header row containing the names of each column in the data source.
setRecipientDatas(OdsoRecipientDataCollection value)Sets a collection of objects that specify inclusion/exclusion of individual records in the mail merge.
setTableName(String value)Specifies the particular set of data that a source shall be connected to within an external data source.
setUdlConnectString(String value)Specifies the Universal Data Link (UDL) connection string used to connect to an external data source.

deepClone()

public Odso deepClone()

Returns a deep clone of this object.

Returns: Odso

getColumnDelimiter()

public char getColumnDelimiter()

Specifies the character which shall be interpreted as the column delimiter used to separate columns within external data sources. The default value is 0 which means there is no column delimiter defined.

Remarks:

RK I have never seen this in use.

Returns: char - The corresponding char value.

getDataSource()

public String getDataSource()

Specifies the location of the external data source to be connected to a document to perform the mail merge. The default value is an empty string.

Returns: java.lang.String - The corresponding java.lang.String value.

getDataSourceType()

public int getDataSourceType()

Specifies the type of the external data source to be connected to as part of the ODSO connection information for this mail merge. The default value is OdsoDataSourceType.DEFAULT.

Remarks:

This setting is purely a suggestion of the data source type that is being used for this mail merge.

Returns: int - The corresponding int value. The returned value is one of OdsoDataSourceType constants.

getFieldMapDatas()

public OdsoFieldMapDataCollection getFieldMapDatas()

Gets a collection of objects that specify how columns from the external data source are mapped to the predefined merge field names in the document. This object is never null .

Returns: OdsoFieldMapDataCollection - A collection of objects that specify how columns from the external data source are mapped to the predefined merge field names in the document.

getFirstRowContainsColumnNames()

public boolean getFirstRowContainsColumnNames()

Specifies that a hosting application shall treat the first row of data in the specified external data source as a header row containing the names of each column in the data source. The default value is false .

Remarks:

RK I have never seen this in use.

Returns: boolean - The corresponding boolean value.

getRecipientDatas()

public OdsoRecipientDataCollection getRecipientDatas()

Gets a collection of objects that specify inclusion/exclusion of individual records in the mail merge. This object is never null .

Returns: OdsoRecipientDataCollection - A collection of objects that specify inclusion/exclusion of individual records in the mail merge.

getTableName()

public String getTableName()

Specifies the particular set of data that a source shall be connected to within an external data source. The default value is an empty string.

Returns: java.lang.String - The corresponding java.lang.String value.

getUdlConnectString()

public String getUdlConnectString()

Specifies the Universal Data Link (UDL) connection string used to connect to an external data source. The default value is an empty string.

Returns: java.lang.String - The corresponding java.lang.String value.

setColumnDelimiter(char value)

public void setColumnDelimiter(char value)

Specifies the character which shall be interpreted as the column delimiter used to separate columns within external data sources. The default value is 0 which means there is no column delimiter defined.

Remarks:

RK I have never seen this in use.

Parameters:

ParameterTypeDescription
valuecharThe corresponding char value.

setDataSource(String value)

public void setDataSource(String value)

Specifies the location of the external data source to be connected to a document to perform the mail merge. The default value is an empty string.

Parameters:

ParameterTypeDescription
valuejava.lang.StringThe corresponding java.lang.String value.

setDataSourceType(int value)

public void setDataSourceType(int value)

Specifies the type of the external data source to be connected to as part of the ODSO connection information for this mail merge. The default value is OdsoDataSourceType.DEFAULT.

Remarks:

This setting is purely a suggestion of the data source type that is being used for this mail merge.

Parameters:

ParameterTypeDescription
valueintThe corresponding int value. The value must be one of OdsoDataSourceType constants.

setFieldMapDatas(OdsoFieldMapDataCollection value)

public void setFieldMapDatas(OdsoFieldMapDataCollection value)

Sets a collection of objects that specify how columns from the external data source are mapped to the predefined merge field names in the document. This object is never null .

Parameters:

ParameterTypeDescription
valueOdsoFieldMapDataCollectionA collection of objects that specify how columns from the external data source are mapped to the predefined merge field names in the document.

setFirstRowContainsColumnNames(boolean value)

public void setFirstRowContainsColumnNames(boolean value)

Specifies that a hosting application shall treat the first row of data in the specified external data source as a header row containing the names of each column in the data source. The default value is false .

Remarks:

RK I have never seen this in use.

Parameters:

ParameterTypeDescription
valuebooleanThe corresponding boolean value.

setRecipientDatas(OdsoRecipientDataCollection value)

public void setRecipientDatas(OdsoRecipientDataCollection value)

Sets a collection of objects that specify inclusion/exclusion of individual records in the mail merge. This object is never null .

Parameters:

ParameterTypeDescription
valueOdsoRecipientDataCollectionA collection of objects that specify inclusion/exclusion of individual records in the mail merge.

setTableName(String value)

public void setTableName(String value)

Specifies the particular set of data that a source shall be connected to within an external data source. The default value is an empty string.

Parameters:

ParameterTypeDescription
valuejava.lang.StringThe corresponding java.lang.String value.

setUdlConnectString(String value)

public void setUdlConnectString(String value)

Specifies the Universal Data Link (UDL) connection string used to connect to an external data source. The default value is an empty string.

Parameters:

ParameterTypeDescription
valuejava.lang.StringThe corresponding java.lang.String value.