How can force column order in excel when linking to external data

We have a series of quick "reports" which are just auto-refreshing excel spreadsheets which link to views in SQL Server.  This allows me to change the underlying view when they want additional information, and the column will automatically appear the next time they refresh.  It works, and I have to be able to use excel for this so please don't try convincing me to change that.  The annoying problem I face is that when I add columns, they always appear at the right most position to previous columns in the external data table regardless of their actual position in the data set.

If I remove the external data set and re-add it from the Existing Connections screen, that works.  How can I, not using VBA if possible, have it always load the columns in the order in which they are returned from the SQL data set.

I have also thought about saving the excel spreadsheet after refreshing it with only one column returned from the procedure, and locking the spreadsheet so it cannot be saved, so that each time it loads it load every column as a new column.

I am using Excel 2007.
LVL 39
BrandonGalderisiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rory ArchibaldCommented:
Have you tried right-clicking the table, choosing Table-data range properties and then unchecking the 'Preserve column sort/filter/layout' option?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BrandonGalderisiAuthor Commented:
We want to keep the filters and sort of data, just not order of columns because some people will care about different sub-sections of data.  

That could be a solution though if no one comes up with anything better.
0
Rory ArchibaldCommented:
You will still be able to filter and sort.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

BrandonGalderisiAuthor Commented:
I know.  But we want to be able to sit down with someone who is non-technical, set up the filters and sorting that THEY want, then be able to refresh it and get new data.
0
BrandonGalderisiAuthor Commented:
Hey rorya.  It's been a week and no-one has come in with another suggestion.  Unfortunately as it stands I don't have a solution so I am going to begin the process to delete this question.
0
Rory ArchibaldCommented:
That is the answer though, so it does serve as a PAQ. You can alter the column layout but at the expense of preserving filters. "You can't do that" can still be a valid answer. :)
0
BrandonGalderisiAuthor Commented:
rorya is correct.  

Although my specific problem was not resolved, that is because his solution doesn't retain functionality that we need.  At face value (Question title) and initial question comment, I mention nothing about needing to retain sort and filtering.  Therefore, I will be accepting an answer.
0
Dominic FCommented:
I know this is old but...

It works for me in the order I want. While checked Preserve order means the columns will stay as they are when first queried. If you rearrange the columns later this wont have an effect. If you do make this change and require VBA to do it. Perhaps you can uncheck, refresh and then recheck the preserve columns. This has worked for me.
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.