Results 1 to 5 of 5
  1. #1
    Ganymede is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Dec 2011
    Posts
    116

    Can you update a linked table from an excel document in Access?


    My access database has a linked table from an excel document. I would like to be able to run an append query from my database to add records to the excel document. Is this possible? I have researched this a bit and what I'm reading (from posts 5+ years ago) that a linked table from excel will always be read only.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Can make a link to Excel sheet editable, except for row delete. Requires changing connection string IMEX parameter to 0.

    There's a couple of ways to link to Excel table.
    Can use External Data wizard to create link then use Linked Table Manager to edit the link string.
    Other way is to build a query object that has connection string. Example:

    SELECT * FROM [Units$] IN 'C:\Users\June\Condos.xlsx'[Excel 12.0;HDR=yes;IMEX=0;ACCDB=Yes];
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Ganymede is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Dec 2011
    Posts
    116
    Quote Originally Posted by June7 View Post
    Can make a link to Excel sheet editable, except for row delete. Requires changing connection string IMEX parameter to 0.

    There's a couple of ways to link to Excel table.
    Can use External Data wizard to create link then use Linked Table Manager to edit the link string.
    Other way is to build a query object that has connection string. Example:

    SELECT * FROM [Units$] IN 'C:\Users\June\Condos.xlsx'[Excel 12.0;HDR=yes;IMEX=0;ACCDB=Yes];
    Thank you! Changing the IMEX parameter to 0 in the linked table manager worked for me! Marking as resolved.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    Just be aware that unlike databases, excel does not have any datatyping so there is nothing to stop a user entering text in a date or numeric field - unless you put in the relevant control to prevent that happening.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    As far as I can tell, link does enforce data types. Cannot enter text into a column assigned as number or date type.

    True, if wrong data entered directly in Excel, will cause an error in the linked table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Can you add data to a linked excel table
    By Sonyat810 in forum Forms
    Replies: 10
    Last Post: 10-06-2022, 10:46 PM
  2. Replies: 4
    Last Post: 08-05-2018, 04:38 AM
  3. Replies: 9
    Last Post: 09-13-2016, 03:47 AM
  4. Replies: 1
    Last Post: 07-07-2016, 12:41 PM
  5. Replies: 5
    Last Post: 01-23-2014, 09:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums