#  Other Applications & Softwares  > Access Tables & Databases >  >  Copy/Paste Excel data into Access

## jay567

Hi,

How do I copy/paste data from my Excel spreadsheet into Access? When I copy a range of cells from Excel then paste it into Access, the pasted data is shifted by 1 column to the left so that my first column (dates) from Excel is not imported and all my newly pasted data is under the wrong heading.  Do I need to add an extra first column to my excel spreadsheet as an "ID" column?

Historically I've just been using the import function on Access but it seems to take a long time so I'm just trying this method.

Thanks,

Jason

----------


## JieJenn

It is better to import data to MS Access than copy/paste

----------


## jay567

Thanks for the reply.

Is there anything I can do to make an import faster?  It will take me a few minutes to open data from the spreadsheet in Access, then another few minutes to import the data into Access... I have to do this every day for a few spreadsheets so it drives me nuts just waiting so long for a spreadsheet that may have up to 70 rows?  It just seems to me like it shouldn't take so long!

Jason

----------


## davegugg

If you automate the import using VBA it should take no longer than 5 seconds at the very most.

Here is some generic code that clears a table, then imports new data into it from Excel:





```
Please Login or Register  to view this content.
```


You should be able to modify this for your purposes.

----------


## Whizbang

This is because you are probably also selecting the ID field (either because you selected the entire row in Access, or because you selected the ID field manually).

In access, on the "New" record row, hover your mouse on left-hand side of the first field after ID.  It should turn into a fat, white plus sign.  Click and drag to the right the same number of columns you are copying from excel.

Then paste.  It should put the first copied column from excel into the first selected column in Access.

----------


## jay567

Thanks Dave, just a quick question regarding the VBA code. Why would using the VBA code only take 5 seconds to import but if I manually do it, it will take minutes?

Thanks for the suggestion Whizbang, put your way works if I am pasting 1 row but I often have many rows to paste.

----------


## jay567

I think I figured out my problem.  I was trying to import a spreadsheet that contained formulas with cell references and was part of a workbook with lots of other formulas and numbers in it.  I just copied and pasted the values that I wanted into a new Excel workbook and imported that into Access and it was super fast.

Thanks for all your help!

----------

