Trouble importing Excel to Access

kelly1

Well-known Member
Joined
May 11, 2003
Messages
525
I am trying to import an Excel Spreadsheet into Access as a new table but I’m having a problem with one column.


Some entries are being displayed incorrectly as example:
1.01173e+009

The proper format should be as eaxample:
321040989454

In Excel and Access the columns are formatted as ‘Text’

Can anybody give me any ideas as to what could be wrong please?

Regards

Kelly
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Go through the import process again. When you get to the stage in the Wizard where you can include / skip fields, use the navigation arrows to go to the problem field. It's probably coming in as a Double (Excel's default data type). Dunno why -- sometimes Access ignores the Text data type when you bring in data from Excel.
Have you tried saving the Excel sheet as a .csv?

Denis
 
Upvote 0
I tried saving as a CSV but the problem is still there. It seems to be the way Excel is exporting it.

Is there a way to prefix the numbers with a letter to make it an obvious text data with find and replace using wildcards, then remove them afterwards?

Its not happening with any other column, just the one with 12 reference numbers.

Kelly
 
Upvote 0
You may need to create your own VBA eport routine to force Excel to formalt it the way that you want it.
You could also add a prefix/suffix either by creating a coderoutne to do it for you or just by adding a column joining the data with a letter there and then paste back over the original data. In Acess you could use an Update query to strip your suffix.
The method to choose will really depend on how often you have to do this.
You dont say what methods of import that you have tried in Access. Sometimes just pasting the data or linking to it will work when the wizard fails.

HTH

Peter
 
Upvote 0
:oops:

Hello...totally new to this forum and VBA.

I'm trying to get the specifics of exporting a excel file into a access table either via a access form or routine(?).

Any and all help is greatly appreciated.

Thanks
 
Upvote 0
Kelly,

In Excel you can put a single quotation mark in front of the value and it will be interpreted as text. For example: '321040989454 instead of 321040989454.

If that doesn't work or if there are too many rows to manually insert a single quotation mark, try copying the column and doing a Paste Special->Values to get excel to save it as text.

There is also an Excel feature under Data->Text To Columns that can convert the data in the column to all text. This works for me sometimes.

Hope this helps.
 
Upvote 0
in Access, the only way I can get those to show correctly is to import them as numbers but with the following specs:

Field Size: Double
Format: Fixed
Decimal Places: 0
 
Upvote 0

Forum statistics

Threads
1,221,572
Messages
6,160,575
Members
451,656
Latest member
SBulinski1975

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