Linked File not Numeric Data

RWALTZ

New Member
Joined
Dec 21, 2006
Messages
22
In Access 2000, I importing a table by linking to an Excel file. When I do this the numeric data is coming over as text and I get a num # error in the cells which are supposed to be numeric. In the Excel spreadsheet, the number cellls are set to number with 0 decimal places. In Access, I checked the table in design view and the numeric fields were set to text. I tried to change the fields to numeric but it would not save as numeric. How can I link the excel file so that the fields are numeric?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
One of the reasons for the strange import behaviour is that Access will usually guess the data type by looking at the first few rows in the field. If they are blank it will default to Text.

When you import the data, you get the option to set the data type at the third or fourth step in the Wizard. Make sure that the data type is set to Number and try again.

If that doesn't work you can import into a new table, then use an Append query to add the records to the real table. At that stage you can convert the data to numbers by using an expression like CLng([My Field])

Denis
 
Upvote 0
When I import from Excel without a link, it works fine. I wanted to link to Excel because I want the table in Access to change as I update the Excel file.
 
Upvote 0
I tend not to use linked Excel files, for three reasons. They are:
1. Performance; native Access tables are faster.
2. Locking; if you try to open the workbook while the Access DB is open, or open the DB while the workbook is open, you will get an error message.
3. Relevant for later versions of Access; linked Excel tables are read-only.

However, look at the spreadsheet. Are there any blank rows before the data starts in the problem fields? If so, reorganise the data (or include a dummy record) so Access gets the data type correct.

Denis
 
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,946
Members
449,480
Latest member
yesitisasport

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top