Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
While using the Resources["CSVParserFunctions"].WriteCSVFile API withHeader: true, The order of columns are changed in generated CSV File. How to maintain the same order of columns in CSV File.
Resources["CSVParserFunctions"].WriteCSVFile({
path: "/"+formattedDate+"/"+FolderName+"/"+FileName /* STRING */,
data: ExportData /* INFOTABLE */,
fileRepository: "WCCompareXA_Repository" /* THINGNAME */,
withHeader: true/* BOOLEAN */
});
Solved! Go to Solution.
The order should be determined by the ordinal of the column which you can set:
table.dataShape.fields["A"].ordinal = 3;
table.dataShape.fields["B"].ordinal = 2;
table.dataShape.fields["C"].ordinal = 1;
The order should be determined by the ordinal of the column which you can set:
table.dataShape.fields["A"].ordinal = 3;
table.dataShape.fields["B"].ordinal = 2;
table.dataShape.fields["C"].ordinal = 1;