Hi,
you an create a template dynamically using :
DataExportTemplateData templateData = new DataExportTemplateData();
DataExportTemplateData.DataExportTemplatesRow template = templateData.
DataExportTemplates.NewDataExportTemplatesRow();
template.DataExportTemplateId = -1;
template.DataExportTemplateTypeId = (int)ExportDataType.Xml;
template.TemplateTitle =
template.ExportStartDate =
template.ExportEndDate =
template.ExportEncoding = "UTF-8";
template.SetFilterIdNull();
template.SurveyId =
template.UseReportingAlias =
template.IncludeRespondentDate =
template.IncludeRespondentEmail =
template.IncludeRespondentId =
template.IncludeRespondentIp =
template.IncludeRespondentLanguage =
template.IncludeRespondentUsername =
template.IncludeSecurityAddin =
template.ResponseExportType = (int)ResponseExportType.Completed;
templateData.DataExportTemplates.AddDataExportTemplatesRow(template);