function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Excel Connector: Column Order of returned data fields - how to specify?

Is there a way to specify the desired ordering of fields returned by the query? e.g. I'd like the SF-ID field in in the left-most column of the returned data, to use as a lookup field.

I cannot see a way to do this using the wizard (I guess that would require an additional wizard step) and I'm not sure where to look in the mass of VBA code.

Thanks for any advice you can offer.
You can reorder the cells that contain the field names when they are in Excel.  The object ID field has to be first.
Thanks for your answer, but do you mean physically re-arrange, ie copy paste the columns around? Won't the query simply overwrite the new order the next time it is run?

I want to avoid the manual interaction this would require. The information returned needs to flow into another application, using the SF-ID (eg the 1234-5678 format id) as a lookup key in the leftmost column.

Harry JamesHarry James
No, you can move the field names in your column headers to suit your taste - other than having the Record ID in Column A.  The next time you run the query, data will be returned in the sequence as you have arranged it.

You can always use another worksheet to reorder the columns using formulas that reference the columns as returned from salesforce.  Then have this spreadsheet used as the source for your other software that requires a certain column order.