Problem importing from excel to access. My #'s get rounded! (1 Viewer)

killyridols

Registered User.
Local time
Yesterday, 17:33
Joined
Jul 16, 2009
Messages
22
hello there,
I am trying to import data from an excel spreadsheet into an access table.
The problem is that all my values keep getting rounded up or down, and my decimals are not preserved.
I have tried creating a table, setting the data types to 'decimal', then importing the data in, and it doesn't work. My numbers are rounded to 0 or 1.
I have also tried importing the data straight to a new table, and setting the data types to decimal in the import manager. Same result.
Is there something I am missing here?
Any help would be greatly appreciated!
 

David Eagar

Registered User.
Local time
Today, 10:33
Joined
Jul 2, 2007
Messages
924
A method, but maybe not the most elegant, is to import as a text field and then convert it to the decimal format you require
 

Atomic Shrimp

Humanoid lifeform
Local time
Today, 01:33
Joined
Jun 16, 2000
Messages
1,954
When Access imports from Excel, it doesn't always give you very much control over things like this - it may decide on the appropriate field type based on the data in the first few rows - so in your case, if they just happen to be whole numbers, Access might not be seeing the need for them to be otherwise.

You can often force it to do what you want by inserting a dummy row of data at the top of your spreadsheet - put 1.2345 in the columns you want to be imported as decimal numbers, then delete the dummy row after importing.

You can do the same thing in cases where you have a column containing mostly numeric codes (ISBNs, EANs, etc) that you want to import as text so as to preserve leading zeroes - insert a dummy row and type ABC in that column, to force the import process to do it as text.
 

Users who are viewing this thread

Top Bottom