troubleshooting Question

Excel column ordering automatically

Avatar of toooki
toooki asked on
Microsoft AccessMicrosoft ExcelVB Script
8 Comments1 Solution296 ViewsLast Modified:
I created an web application that let users download the application content in an excel file (csv file). In the application I have no ways to pre-define the column order in the downloaded excel file (csv file).

The downloaded excel file comes in incorrect yet fixed field order (say F5  F1  F4  F2  F3 F8 F7 F6). Is there any way (using excel macro or some other I do not know much) that will cause the excel file to show the correct order of the columns when the excel file is opened? On top of that is it possible for the excel file to show only the first 5 fields like this:
F1 F2 F3 F4 F5

The field names are not actually F1, F2 etc. but the field names are known (those to be included and excluded).

Thanks a lot.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros