Difference between revisions of "ExportSettingsExcelCsvFile class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=ExportSettingsExcelCsvFile |Description=Export settings for the Excel and Csv File format. |Methods= {{CGscriptMethods_Template|ReturnType=Empty...")
 
Line 32: Line 32:
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
 
}}
 
}}
 +
=== <span style="color:#DF8621">'''Examples'''</span> ===
 +
<source lang="javascript">
 +
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();
 +
</source>

Revision as of 10:20, 19 April 2017

ExportSettingsExcelCsvFile



Export settings for the Excel and Csv File format.


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 exportToCsv "Export to the given format", bool exportToExcel "Export to the given format") - Add all questions 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 PresentAsText(int questionnaireResourceId "The questionnaire the question is located in", string questionLabel "Label of the question") - Return PresentAsText of question in export
  • string ToString() - The string representation of the object.

Properties

  • bool CsvFileOptionsUseCommaSeparatedFormat { get; set; } - Get/set if exporting to specific format with given option
  • 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.
  • TypeInformation TypeInformation { get; } - Get information about this class.

Examples

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();