Results 1 to 5 of 5

Thread: Paste some records in Access

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    30

    Paste some records in Access

    I have an Excel file with some data. I don't have time to insert them in an Access DB using the customized input form. I just want to copy the data from Excel and paste into the .mdb file (records or columns). Is there any quick mode? I've tried the usual copy&paste but it doesn't always work.

  2. #2
    Frenzied Member
    Join Date
    Aug 2005
    Posts
    1,042

    Re: Paste some records in Access

    drimades:

    According to the Excel Help File, this is what you need to do:

    Make sure the Microsoft Excel data is in list (list: A series of rows that contains related data or a series of rows that you designate to function as a datasheet by using the Create List command.) format: each column has a label in the first row and contains similar facts, and there are no blank rows or columns within the list.

    Close the Excel workbook that contains the data you want to use in Microsoft Access.

    In Access, open the database where you want to copy the Excel data.

    On the Access File menu, point to Get External Data, and then click Import.

    In the Import dialog box, click Microsoft Excel in the Files of type box.

    In the Look in list, locate the file you want to import, and then double-click the file.

    Follow the directions in the Import Spreadsheet Wizard.

    For more information about this wizard and Access, click Display Help after the wizard is finished.

    Good Luck

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Paste some records in Access

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Re: Paste some records in Access

    Not exactly an argument for VB.Net 2003 there, is it?
    Tengo mas preguntas que contestas

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Paste some records in Access

    Well not actually if you consider my code example was an entire application.

    So it is actually one line...

    VB Code:
    1. moApp.DoCmd.TransferSpreadsheet(Access.AcDataTransferType.acImport, Access.AcSpreadSheetType.acSpreadsheetTypeExcel9, "Excel_Sheet2", "D:\Book1.xls", False, "Sheet2$")
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width