I don’t think that is going to help because the csv is simply created by passing the query results into an HTML element using a json stringify function in whatever order the results are generated.
I’m basically using a modified version of Steve Cropper’s code from here: https://www.wix.com/velo/forum/tips-tutorials-examples/how-to-download-the-contents-of-a-data-collection-in-a-csv-file.
I’m now experimenting with converting specific query results “items” into a new array (with the “items” being pre-defined in the proper order) and then passing that new array into the json stringify function instead of the raw query results. But with around 170 columns to specifically identify, that is going to be one laborious coding process. ![]()
AFTERTHOUGHT: As I mentioned previously, in Wix editor mode, a manual download of the csv export arrives in the expected order (i.e. the order the columns appear in the Collections editor) and the downloaded .CSV file is even properly named with the Collections title. Would it be possible for the Velo team to expose that function for inclusion in user-generated Javascript coding? Somehow those column indexes are correctly identified in that process but apparently NOT in the wixData.query() process.