Difference between revisions of "ExportSettingsExcelCsvFile class"

From Catglobe Wiki
Jump to: navigation, search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{CGscriptClass_Template
 
{{CGscriptClass_Template
|Name=ExportSettingsExcelCsvFile
+
|Name=<nowiki>ExportSettingsExcelCsvFile</nowiki>
|Description=Export settings for the Excel and Csv File format.
+
|Description=<nowiki>Export settings for the Excel and Csv File format.</nowiki>
|Methods=
+
|InheritsFrom=object|Methods=
{{CGscriptMethods_Template|ReturnType=Empty|Name=AddAllQuestions|Parameters=
+
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddAllQuestions</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=questionnaireResourceId|Description=The questionnaire the question is located in|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=presentAsText|Description=Export the option as the value or as the text|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=exportToCsv|Description=Export to the given format|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=exportToExcel|Description=Export to the given format}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>presentAsText</nowiki>|Description=<nowiki>Export the option as the value or as the text</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>optionsAsMultipleColumns</nowiki>|Description=<nowiki>Export the options as multiple columns</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToCsv</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToExcel</nowiki>|Description=<nowiki>Export to the given format</nowiki>}}
|Description=Add all questions to the export}}
+
|Description=<nowiki>Add all questions to the export. Default ignore GDPR classified questions.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=AddQuestion|Parameters=
+
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddAllQuestions</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=questionnaireResourceId|Description=The questionnaire the question is located in|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=questionLabel|Description=Label of the question|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=presentAsText|Description=Export the option as the value or as the text|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=exportToCsv|Description=Export to the given format|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=exportToExcel|Description=Export to the given format}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>presentAsText</nowiki>|Description=<nowiki>Export the option as the value or as the text</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>optionsAsMultipleColumns</nowiki>|Description=<nowiki>Export the options as multiple columns</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToCsv</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToExcel</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>includeQuestionWithGDPRDate</nowiki>|Description=<nowiki>Include questions marked as containing GDPR classified data</nowiki>}}
|Description=Add question to the export}}
+
|Description=<nowiki>Add all questions to the export</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=Clear|Description=Remove format from output}}
+
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddAllQuestions</nowiki>|Parameters=
{{CGscriptMethods_Template|ReturnType=int|Name=GridIndex|Parameters=
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>presentAsText</nowiki>|Description=<nowiki>Export the option as the value or as the text</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToCsv</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToExcel</nowiki>|Description=<nowiki>Export to the given format</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=questionnaireResourceId|Description=The questionnaire the question is located in|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=questionLabel|Description=Label of the question}}
+
|Description=<nowiki>Add all questions to the export. Default ignore GDPR classified questions.</nowiki>}}
|Description=Return GridIndex of question in export}}
+
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddQuestion</nowiki>|Parameters=
{{CGscriptMethods_Template|ReturnType=bool|Name=IsQuestionExported|Parameters=
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Label of the question</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>presentAsText</nowiki>|Description=<nowiki>Export the option as the value or as the text</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>optionAsMultipleColumns</nowiki>|Description=<nowiki>Export the options as multiple columns</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToCsv</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToExcel</nowiki>|Description=<nowiki>Export to the given format</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=questionnaireResourceId|Description=The questionnaire the question is located in|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=questionLabel|Description=Label of the question}}
+
|Description=<nowiki>Add question to the export</nowiki>}}
|Description=Return true if question is exported}}
+
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>AddQuestion</nowiki>|Parameters=
{{CGscriptMethods_Template|ReturnType=bool|Name=PresentAsText|Parameters=
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Label of the question</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>presentAsText</nowiki>|Description=<nowiki>Export the option as the value or as the text</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToCsv</nowiki>|Description=<nowiki>Export to the given format</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>exportToExcel</nowiki>|Description=<nowiki>Export to the given format</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=questionnaireResourceId|Description=The questionnaire the question is located in|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=questionLabel|Description=Label of the question}}
+
|Description=<nowiki>Add question to the export</nowiki>}}
|Description=Return PresentAsText of question in export}}
+
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Clear</nowiki>|Description=<nowiki>Remove format from output</nowiki>}}
{{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}}
+
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>GridIndex</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Label of the question</nowiki>}}
 +
|Description=<nowiki>Return GridIndex of question in export</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>IsQuestionExported</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Label of the question</nowiki>}}
 +
|Description=<nowiki>Return true if question is exported</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>OptionsAsMultipleColumns</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Label of the question</nowiki>}}
 +
|Description=<nowiki>Return OptionsAsMultipleColumns of question in export</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>PresentAsText</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>questionLabel</nowiki>|Description=<nowiki>Label of the question</nowiki>}}
 +
|Description=<nowiki>Return PresentAsText of question in export</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>SetExportOptionsAsMultipleColumnsForAllQuestions</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>questionnaireResourceId</nowiki>|Description=<nowiki>The questionnaire the question is located in</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>optionValue</nowiki>|Description=<nowiki>Option value (true/false)</nowiki>}}
 +
|Description=<nowiki>Set value of the OptionsAsMultipleColumns option for all questions whose type is Multi or MultiGrid</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
 
|Properties=
 
|Properties=
{{CGscriptProperties_Template|ReturnType=bool|Name=CsvFileOptionsUseCommaSeparatedFormat|HasGetter=1|HasSetter=1|Description=Get/set if exporting to specific format with given option}}
+
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>CsvFileOptionsUseCommaSeparatedFormat</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/set if exporting to specific format with given option</nowiki>}}
{{CGscriptProperties_Template|ReturnType=bool|Name=ExcelFileOptionsUseCommaSeparatedFormat|HasGetter=1|HasSetter=1|Description=Get/set if exporting to specific format with given option}}
+
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>ExcelFileOptionsAddQuestionText</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/set if add question text to the file is enable</nowiki>}}
{{CGscriptProperties_Template|ReturnType=bool|Name=ExportAddressInformation|HasGetter=1|HasSetter=1|Description=Get/set if exporting to specific format with given option}}
+
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>ExcelFileOptionsUseCommaSeparatedFormat</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/set if exporting to specific format with given option</nowiki>}}
{{CGscriptProperties_Template|ReturnType=bool|Name=ExportPhoneNumbers|HasGetter=1|HasSetter=1|Description=Get/set if exporting to specific format with given option}}
+
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>ExportAddressInformation</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/set if exporting to specific format with given option</nowiki>}}
{{CGscriptProperties_Template|ReturnType=bool|Name=ExportUserAccountInformation|HasGetter=1|HasSetter=1|Description=Get/set if exporting to specific format with given option}}
+
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>ExportPhoneNumbers</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/set if exporting to specific format with given option</nowiki>}}
{{CGscriptProperties_Template|ReturnType=bool|Name=ExportUserEmail|HasGetter=1|HasSetter=1|Description=Get/set if exporting to specific format with given option}}
+
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>ExportUserAccountInformation</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/set if exporting to specific format with given option</nowiki>}}
{{CGscriptProperties_Template|ReturnType=bool|Name=IsCsvFileExport|HasGetter=1|Description=Get if exporting to specific format}}
+
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>ExportUserEmail</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Get/set if exporting to specific format with given option</nowiki>}}
{{CGscriptProperties_Template|ReturnType=bool|Name=IsExcelFileExport|HasGetter=1|Description=Get if exporting to specific format}}
+
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>IsCsvFileExport</nowiki>|HasGetter=1|Description=<nowiki>Get if exporting to specific format</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}}
+
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>IsExcelFileExport</nowiki>|HasGetter=1|Description=<nowiki>Get if exporting to specific format</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 +
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
 
}}
 
}}
 +
 
=== <span style="color:#DF8621">'''Examples'''</span> ===
 
=== <span style="color:#DF8621">'''Examples'''</span> ===
 
<source lang="javascript">
 
<source lang="javascript">
 +
//********** Example for making an export to excel ************//
 
string ResourceName="test ExportManager type excel";
 
string ResourceName="test ExportManager type excel";
 
number parentResourceId = 11088827;
 
number parentResourceId = 11088827;
 
ExportManager EM = new ExportManager (ResourceName, parentResourceId );
 
ExportManager EM = new ExportManager (ResourceName, parentResourceId );
 
 
EM.AddQuestionnaire(15546533);
 
EM.AddQuestionnaire(15546533);
 
 
ExportSettingsExcelCsvFile exportSetting = EM.ExportSettingsExcelCsvFile;
 
ExportSettingsExcelCsvFile exportSetting = EM.ExportSettingsExcelCsvFile;
 
number questionnaireResourceId = 15546533;
 
number questionnaireResourceId = 15546533;
Line 47: Line 63:
 
exportSetting.AddAllQuestions(questionnaireResourceId, presentAsText, exportToCsv, exportToExcel );
 
exportSetting.AddAllQuestions(questionnaireResourceId, presentAsText, exportToCsv, exportToExcel );
 
exportSetting.ExcelFileOptionsUseCommaSeparatedFormat = true;
 
exportSetting.ExcelFileOptionsUseCommaSeparatedFormat = true;
 
 
EM.Language ="en-GB";
 
EM.Language ="en-GB";
 
 
exportSetting.ExportAddressInformation= true;
 
exportSetting.ExportAddressInformation= true;
 
exportSetting.ExportPhoneNumbers = true;
 
exportSetting.ExportPhoneNumbers = true;
Line 55: Line 69:
 
exportSetting.ExportUserEmail = true;
 
exportSetting.ExportUserEmail = true;
 
//exportSetting.IsExcelFileExport = true;
 
//exportSetting.IsExcelFileExport = true;
 
 
DateTime startTime = new DateTime ("2017-4-18");
 
DateTime startTime = new DateTime ("2017-4-18");
 
DateTime endTime = new DateTime ("2017-4-19");
 
DateTime endTime = new DateTime ("2017-4-19");
Line 61: Line 74:
 
EM.CGStartTimeFrameUTC = startTime;
 
EM.CGStartTimeFrameUTC = startTime;
 
EM.CGEndTimeFrameUTC = endTime;
 
EM.CGEndTimeFrameUTC = endTime;
 
 
EM.QasNotStarted = true;
 
EM.QasNotStarted = true;
 
EM.QasPartly = true;
 
EM.QasPartly = true;
 
EM.QasCompleted = true;
 
EM.QasCompleted = true;
 
 
EM.QasNormal = true;
 
EM.QasNormal = true;
 
EM.QasQuotaFull = true;
 
EM.QasQuotaFull = true;
Line 71: Line 82:
 
EM.QasInterviewFailed = true;
 
EM.QasInterviewFailed = true;
 
EM.QasInterviewSucceded = true;
 
EM.QasInterviewSucceded = true;
 
 
EM.IncludedTestData= false;
 
EM.IncludedTestData= false;
 
EM.IncludedDeletedUsers = true;
 
EM.IncludedDeletedUsers = true;
Line 77: Line 87:
 
EM.Save();
 
EM.Save();
 
EM.Export();
 
EM.Export();
 +
</source>
 +
 +
 +
<source lang="javascript">
 +
//********** Example with export question type multi to separate columns ************//
 +
string ResourceName="Export Excel multi cols Q3";
 +
number parentResourceId = 770747;
 +
ExportManager EM= new ExportManager (ResourceName, parentResourceId );
 +
//ExportManager EM = new ExportManager (2947148);
 +
//EM.Reset();
 +
EM.AddQuestionnaire(2641061);
 +
ExportSettingsExcelCsvFile exportSetting = EM.ExportSettingsExcelCsvFile;
 +
number questionnaireResourceId = 2641061;
 +
string questionLabel = "Q3";
 +
bool presentAsText = false;
 +
bool optionsAsMultipleColumns = true;
 +
bool exportToCsv = false;
 +
bool exportToExcel = true;
 +
exportSetting.AddQuestion(questionnaireResourceId, questionLabel, presentAsText, optionsAsMultipleColumns, exportToCsv, exportToExcel );
 +
//exportSetting.AddAllQuestions(questionnaireResourceId, presentAsText, exportToCsv, exportToExcel );
 +
exportSetting.ExcelFileOptionsUseCommaSeparatedFormat = false;
 +
EM.Language ="en-GB";
 +
exportSetting.ExportAddressInformation= false;
 +
exportSetting.ExportPhoneNumbers = false;
 +
exportSetting.ExportUserAccountInformation = false;
 +
exportSetting.ExportUserEmail = false;
 +
EM.QasNotStarted = true;
 +
EM.QasPartly = true;
 +
EM.QasCompleted = true;
 +
EM.QasNormal = true;
 +
EM.QasQuotaFull = true;
 +
EM.QasOutsideTarget = true;
 +
EM.QasInterviewFailed = true;
 +
EM.QasInterviewSucceded = true;
 +
EM.IncludedTestData= false;
 +
EM.IncludedDeletedUsers = false;
 +
EM.IncludedDisabledUsers = false;
 +
EM.Save();
 +
//EM.Export();
 
</source>
 
</source>

Latest revision as of 08:04, 2 July 2020

ExportSettingsExcelCsvFile



Export settings for the Excel and Csv File format.

Parent class

Inherits from object

Methods

  • Empty AddAllQuestions(int questionnaireResourceId "The questionnaire the question is located in", bool presentAsText "Export the option as the value or as the text", bool optionsAsMultipleColumns "Export the options as multiple columns", bool exportToCsv "Export to the given format", bool exportToExcel "Export to the given format") - Add all questions to the export. Default ignore GDPR classified questions.
  • Empty AddAllQuestions(int questionnaireResourceId "The questionnaire the question is located in", bool presentAsText "Export the option as the value or as the text", bool optionsAsMultipleColumns "Export the options as multiple columns", bool exportToCsv "Export to the given format", bool exportToExcel "Export to the given format", bool includeQuestionWithGDPRDate "Include questions marked as containing GDPR classified data") - Add all questions to the export
  • Empty AddAllQuestions(int questionnaireResourceId "The questionnaire the question is located in", bool presentAsText "Export the option as the value or as the text", bool exportToCsv "Export to the given format", bool exportToExcel "Export to the given format") - Add all questions to the export. Default ignore GDPR classified questions.
  • Empty AddQuestion(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question", bool presentAsText "Export the option as the value or as the text", bool optionAsMultipleColumns "Export the options as multiple columns", bool exportToCsv "Export to the given format", bool exportToExcel "Export to the given format") - Add question to the export
  • Empty AddQuestion(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question", bool presentAsText "Export the option as the value or as the text", bool exportToCsv "Export to the given format", bool exportToExcel "Export to the given format") - Add question to the export
  • Empty Clear() - Remove format from output
  • int GridIndex(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question") - Return GridIndex of question in export
  • bool IsQuestionExported(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question") - Return true if question is exported
  • bool OptionsAsMultipleColumns(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question") - Return OptionsAsMultipleColumns of question in export
  • bool PresentAsText(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question") - Return PresentAsText of question in export
  • Empty SetExportOptionsAsMultipleColumnsForAllQuestions(int questionnaireResourceId "The questionnaire the question is located in", bool optionValue "Option value (true/false)") - Set value of the OptionsAsMultipleColumns option for all questions whose type is Multi or MultiGrid
  • (From object) string ToString() - The string representation of the object.

Properties

  • bool CsvFileOptionsUseCommaSeparatedFormat { get; set; } - Get/set if exporting to specific format with given option
  • bool ExcelFileOptionsAddQuestionText { get; set; } - Get/set if add question text to the file is enable
  • bool ExcelFileOptionsUseCommaSeparatedFormat { get; set; } - Get/set if exporting to specific format with given option
  • bool ExportAddressInformation { get; set; } - Get/set if exporting to specific format with given option
  • bool ExportPhoneNumbers { get; set; } - Get/set if exporting to specific format with given option
  • bool ExportUserAccountInformation { get; set; } - Get/set if exporting to specific format with given option
  • bool ExportUserEmail { get; set; } - Get/set if exporting to specific format with given option
  • bool IsCsvFileExport { get; } - Get if exporting to specific format
  • bool IsExcelFileExport { get; } - Get if exporting to specific format
  • string ObjectTypeName { get; } - The name of the type of object.
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.


Examples

//********** Example for making an export to excel ************//
string ResourceName="test ExportManager type excel";
number parentResourceId = 11088827;
ExportManager EM = new ExportManager (ResourceName, parentResourceId );
EM.AddQuestionnaire(15546533);
ExportSettingsExcelCsvFile exportSetting = EM.ExportSettingsExcelCsvFile;
number questionnaireResourceId = 15546533;
bool presentAsText = false;
bool exportToCsv = false;
bool exportToExcel = true;
exportSetting.AddAllQuestions(questionnaireResourceId, presentAsText, exportToCsv, exportToExcel );
exportSetting.ExcelFileOptionsUseCommaSeparatedFormat = true;
EM.Language ="en-GB";
exportSetting.ExportAddressInformation= true;
exportSetting.ExportPhoneNumbers = true;
exportSetting.ExportUserAccountInformation = true;
exportSetting.ExportUserEmail = true;
//exportSetting.IsExcelFileExport = true;
DateTime startTime = new DateTime ("2017-4-18");
DateTime endTime = new DateTime ("2017-4-19");
EM.SelectTimeFrame =true;
EM.CGStartTimeFrameUTC = startTime;
EM.CGEndTimeFrameUTC = endTime;
EM.QasNotStarted = true;
EM.QasPartly = true;
EM.QasCompleted = true;
EM.QasNormal = true;
EM.QasQuotaFull = true;
EM.QasOutsideTarget = true;
EM.QasInterviewFailed = true;
EM.QasInterviewSucceded = true;
EM.IncludedTestData= false;
EM.IncludedDeletedUsers = true;
EM.IncludedDisabledUsers = false;
EM.Save();
EM.Export();


//********** Example with export question type multi to separate columns ************//
string ResourceName="Export Excel multi cols Q3";
number parentResourceId = 770747;
ExportManager EM= new ExportManager (ResourceName, parentResourceId );
//ExportManager EM = new ExportManager (2947148);
//EM.Reset();
EM.AddQuestionnaire(2641061);
ExportSettingsExcelCsvFile exportSetting = EM.ExportSettingsExcelCsvFile;
number questionnaireResourceId = 2641061;
string questionLabel = "Q3";
bool presentAsText = false;
bool optionsAsMultipleColumns = true;
bool exportToCsv = false;
bool exportToExcel = true;
exportSetting.AddQuestion(questionnaireResourceId, questionLabel, presentAsText, optionsAsMultipleColumns, exportToCsv, exportToExcel );
//exportSetting.AddAllQuestions(questionnaireResourceId, presentAsText, exportToCsv, exportToExcel );
exportSetting.ExcelFileOptionsUseCommaSeparatedFormat = false;
EM.Language ="en-GB";
exportSetting.ExportAddressInformation= false;
exportSetting.ExportPhoneNumbers = false;
exportSetting.ExportUserAccountInformation = false;
exportSetting.ExportUserEmail = false;
EM.QasNotStarted = true;
EM.QasPartly = true;
EM.QasCompleted = true;
EM.QasNormal = true;
EM.QasQuotaFull = true;
EM.QasOutsideTarget = true;
EM.QasInterviewFailed = true;
EM.QasInterviewSucceded = true;
EM.IncludedTestData= false;
EM.IncludedDeletedUsers = false;
EM.IncludedDisabledUsers = false;
EM.Save();
//EM.Export();