Import from Excel, Fields out of order

echorley

Registered User.
Local time
Today, 12:41
Joined
Mar 11, 2003
Messages
131
With Access 2007, when I import data from an Excel 2007 spreadsheet, the fields are out of order when compared to how they were arranged in Excel.


For example, Access adds an ID field, and when I look at the design of the table after import, the ID field is never the first field, but at some random spot.

This was never an issue with earlier versions of Access.

Has anyone else had this happen to them?
 
There is no guaranteed order in any version of Access with which I have ever worked. It might coincidentally match the order of spreadsheet import - or not.

The only way to guarantee any order to a recordset (note carefully I avoided the word "table" here) is a query with an ORDER BY clause.

If you ever relied on previous versions of Access to maintain a particular order and actually got the order you expected, all I can say is, you were lucky.
 
Let me clarify, I was not talking about the order of the rows, but the fields.

For example, if my Excel has the following fields from left to right

StudentID, LastName, FirstName.

When I import this spreadsheet into Access, and assuming it adds an ID autonumber, the field order is switched around:

FirstName, StudentID, ID, LastName

This never happened in Access 2003.
 
Could you just create a query from the out-of-order fields and generate something that looks more like what you had in excel?
 

Users who are viewing this thread

Back
Top Bottom