WriteCSVFile API withHeader: true changed The order of columns in generated CSV File
Oct 10, 2024
09:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oct 10, 2024
09:47 AM
WriteCSVFile API withHeader: true changed The order of columns in generated CSV File
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.
ACCEPTED SOLUTION
Accepted Solutions
Oct 10, 2024
11:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oct 10, 2024
11:11 AM
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;
1 REPLY 1
Oct 10, 2024
11:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Oct 10, 2024
11:11 AM
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;
