Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert from Excel - General number format 1

Status
Not open for further replies.

slobad23

IS-IT--Management
Jun 30, 2006
90
GB
Hopefully this is a really easy one, I just can't seem to figure it out at all.

I am inserting data from Excel (.xls 2007) into Access (2007) and asking it to create a new table based on the file. I have asked it to give the columns titles based on the titles from the file and that is all ok.

The .xls file has a format set for the telephone and fax numbers for "general" which means it could have "0123456" or "1.800 12345 678" and it makes no difference. It just displays the values as they are typed in.

When I import the data into the Access database, it gives it a number format and will change the numbers. It removes preceeding zero's etc..

What I would really like is for the data to be transferred into a similar format that it was in within the .xls file. Am I able to do this by creating a table based on the .xls file or do I need to create a table and import the data into the table I manually created?

Or can I just reformat the table created from the import and allow the numbers to be shown as they were originally.

Hope that all made sense.

Slobad23
 
Slobad23 said:
The .xls file has a format set for the telephone and fax numbers for "general" which means it could have "0123456" or "1.800 12345 678" and it makes no difference. It just displays the values as they are typed in.
That doesn't make sense.

General formatting will strip off leading zeros for entries that 'look like' numbers. That's just how it works. Your second example would retain leading zeros because it contains a space character, and the space tells Excel that it is a text string, not a number.

Phone numbers should be stored as TEXT, not number or general - because you'll never do arithmetic with them.

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top