Excel bug when reordering query columns?

Z

Zig Mandel

Appears to be an excel bug (using excel 2002)
Anyone know a workarround?

If I insert a database query using "New database query" and then later edit
the query (Edit Query context menu option on the query), and insert one more
column and re-order the columns (in Query Wizard: Choose Columns), the new
column order is NOT reflected in the speadsheet. Excel will force the newly
added column to go as the last column.

Any way to work-arround it? The columns are unlocked, if it matters.
Currently my workarround is to delete the inserted query and re-insert it
again. Sort of defeats the purpose of being able to edit the query, and is
very time-consuming.

Thanx,
Zig Mandel
 
A

Arvi Laanemets

Hi

Look at query properties (Data.ExternalData.QueryProperties or somthing
alike)


Arvi Laanemets
 
T

Tushar Mehta

Yep, it seems that XL does indeed insert a new column at the end.

Of course, the result of the database query is something that is a
database table itself. So, while I'm not sure of the importance of the
sequence of the columns, I'm sure you have your reasons.

A tested workaround, once back on the XL worksheet: insert an empty
column whereever you want the new column to be, select the new column
and drag it into place.

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top