Ms-Access Advanced VBA Programming Techniques, Tips and Tricks.

Ads

Copy Paste Data from Excel to Access2007

Methods are already built into office applications to transfer data between them. Importing/Exporting data or directly linking to it while maintaining original data in their parent applications.  Transfer data into Clipboard (Copy) and Paste them into another.   All these methods are already there.

In earlier Access Versions you need to create a Table with matching data field types to Paste or Paste - -> Append data into them.  In Access2007 this is made even better now.  For example you don't need a Table to paste data from Excel into Access2007.  Access2007 will ask you whether you have included the header lines in the copied data or not.  If your answers is Yes Access2007 creates a Table ( with the worksheet name) and pastes the data into it with correct data types.

Want to find out?

  1. Open Microsoft Excel and create a small database with the sample data given below:
  2. Open Microsoft Access2007 and open an existing .accdb database or create a new one.
  3. Make the Excel database window active.
  4. Highlight the Excel database range including the header row.
  5. Select Copy from Home Menu to transfer the data into the Clipboard.
  6. Make the Access2007 database window active.
  7. Right-click on the Navigation Pane and select Paste from the shortcut menu.  The following message box is displayed:
  8. If you have included the header line of the data when you have copied it then you may click on the Yes Command Button otherwise select No.

A new Table will be created with the Worksheet name.  The header cell values will be used as field names.  The field data type (Text, Date, Number etc.) will be correctly defined depending on the type of data that you have copied from excel.

If you have selected No then the data will still be pasted into a new table but the field names will be like F1, F2, F3 etc.

Technorati Tags:
Share:

No comments:

Post a Comment

Trending

Infolinks Text Ads

Popular Posts

Search This Blog

Blog Archive

Powered by Blogger.

Labels

Forms How Tos Functions MS-Access Security Reports Animations msaccess animation msaccess forms Utilities msaccess controls Access and Internet MS-Access Scurity MS-Access and Internet Queries External Links msaccess reports msaccess tips Menus and Toolbars Accesstips MsaccessLinks Process Controls Art Work Downloads msaccess How Tos Graph Charts msaccessQuery List Boxes Command Buttons Emails and Alerts Query Combo Boxes Custom Wizards ms-access functions msaccess graphs msaccess reporttricks msaccessprocess security advanced Access Security DOS Commands Data Macros Menus Property Report Top Values VBA msaccess email msaccess menus progressmeter Access2007 Array Auto-Number Command Button Custom Functions Join Microsoft Numbering System Records Security Split SubForm Table Utility Workgroup database msaccess functions msaccess wizards Access2003 Accounting Year Action Animation Attachment Binary Numbers Budgeting Calculation ChDir Color Palette Conditional Formatting Controls Copy Data Filtering Data Type Defining Pages Diagram Disk Dynamic Lookup Error Handler Excel Export Expression External Field Type Fields Filter Form Form Instances Formatting Groups Hexadecimal Numbers Import Labels List Logo Macro Mail Merge Main Form Memo Methods Monitoring Object Reference Objects Octal Numbers Operating System Paste Primary-Key Product Rank Reading Rich Text Sequence SetFocus Summary Tab-Page Time Difference Union Query User Users Variables Water-Mark Word automatically commands function hyperlinks iSeries Date iif ms-access msaccess msaccess alerts pdf files reference restore switch text toolbar tutorial updating upload vba code

Featured Post

Activity Dates and Quarterly Reports

There are four Quarters in a Year: Jan - Mar = 1st Quarter Apr - Jun = 2nd Jul - Sep = 3rd Oct - Dec = 4th First three months of the yea...

Labels

Blog Archive

Recent Posts